Chromium Code Reviews| Index: chrome/browser/android/shortcut_helper.cc |
| diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc |
| index 1536a9ad36607c177243cc6cb253e8eee2637c17..d6774acc8ece434fb1316ae72753b2682f7c9c32 100644 |
| --- a/chrome/browser/android/shortcut_helper.cc |
| +++ b/chrome/browser/android/shortcut_helper.cc |
| @@ -268,9 +268,12 @@ bool ShortcutHelper::IsWebApkInstalled( |
| content::BrowserContext* browser_context, |
| const GURL& start_url, |
| const GURL& manifest_url) { |
| - return !QueryWebApkPackage(start_url).empty() || |
| - WebApkInstallService::Get(browser_context) |
| - ->IsInstallInProgress(manifest_url); |
| + if (!QueryWebApkPackage(start_url).empty()) |
| + return true; |
| + if (!ChromeWebApkHost::AreWebApkEnabled()) |
| + return false; |
| + WebApkInstallService* service = WebApkInstallService::Get(browser_context); |
| + return service != nullptr && service->IsInstallInProgress(manifest_url); |
|
pkotwicz
2017/01/12 15:37:42
This is no longer necessary?
Xi Han
2017/01/12 15:50:36
I am just not 100 presents sure whether it is nece
|
| } |
| GURL ShortcutHelper::GetScopeFromURL(const GURL& url) { |