Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
customtabs: Make sure that the browser process is initialized in mayL…
Browse files Browse the repository at this point in the history
…aunchUrl().

Since the documentation doesn't force clients to call warmup() before
mayLaunchUrl(), call warmup() for them inside mayLaunchUrl() if
necessary.

BUG=525002

Review URL: https://codereview.chromium.org/1311423003

Cr-Commit-Position: refs/heads/master@{#345590}
  • Loading branch information
lizeb authored and Commit bot committed Aug 26, 2015
1 parent 1598c3b commit d9879f1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ public boolean mayLaunchUrl(ICustomTabsCallback callback, Uri url, final Bundle
if (scheme != null && !scheme.equals("http") && !scheme.equals("https")) return false;
if (!isCallerForegroundOrSelf()) return false;

// Things below need the browser process to be initialized.
if (!warmup(0)) return false;

final IBinder session = callback.asBinder();
final String urlString = url.toString();
final boolean noPrerendering =
Expand Down

0 comments on commit d9879f1

Please sign in to comment.