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}
(cherry picked from commit d9879f1)

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

Cr-Commit-Position: refs/branch-heads/2490@{#42}
Cr-Branched-From: 7790a35-refs/heads/master@{#344925}
  • Loading branch information
Benoit Lize committed Aug 27, 2015
1 parent 6e590e8 commit 9b5c1ff
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 9b5c1ff

Please sign in to comment.