Commit 14731754 authored by zpeng's avatar zpeng Committed by Commit bot

Fix style nit and update variable naming for AddToHomescreenManager.

Review-Url: https://codereview.chromium.org/2384533004
Cr-Commit-Position: refs/heads/master@{#422661}
parent e8efd3e0
...@@ -70,10 +70,10 @@ void AddToHomescreenManager::AddShortcut( ...@@ -70,10 +70,10 @@ void AddToHomescreenManager::AddShortcut(
} }
void AddToHomescreenManager::Start(content::WebContents* web_contents) { void AddToHomescreenManager::Start(content::WebContents* web_contents) {
bool check_installable = false; bool check_webapk_compatible = false;
if (ChromeWebApkHost::AreWebApkEnabled() && if (ChromeWebApkHost::AreWebApkEnabled() &&
content::IsOriginSecure(web_contents->GetLastCommittedURL())) { content::IsOriginSecure(web_contents->GetLastCommittedURL())) {
check_installable = true; check_webapk_compatible = true;
} else { } else {
ShowDialog(); ShowDialog();
} }
...@@ -83,7 +83,7 @@ void AddToHomescreenManager::Start(content::WebContents* web_contents) { ...@@ -83,7 +83,7 @@ void AddToHomescreenManager::Start(content::WebContents* web_contents) {
ShortcutHelper::GetMinimumHomescreenIconSizeInDp(), ShortcutHelper::GetMinimumHomescreenIconSizeInDp(),
ShortcutHelper::GetIdealSplashImageSizeInDp(), ShortcutHelper::GetIdealSplashImageSizeInDp(),
ShortcutHelper::GetMinimumSplashImageSizeInDp(), ShortcutHelper::GetMinimumSplashImageSizeInDp(),
check_installable, this); check_webapk_compatible, this);
} }
AddToHomescreenManager::~AddToHomescreenManager() { AddToHomescreenManager::~AddToHomescreenManager() {
...@@ -153,7 +153,7 @@ void AddToHomescreenManager::OnUserTitleAvailable( ...@@ -153,7 +153,7 @@ void AddToHomescreenManager::OnUserTitleAvailable(
void AddToHomescreenManager::OnDataAvailable(const ShortcutInfo& info, void AddToHomescreenManager::OnDataAvailable(const ShortcutInfo& info,
const SkBitmap& icon) { const SkBitmap& icon) {
if (is_webapk_compatible_) { if (is_webapk_compatible_) {
CreateInfoBarForWebAPK(info, icon); CreateInfoBarForWebApk(info, icon);
return; return;
} }
...@@ -168,7 +168,7 @@ void AddToHomescreenManager::OnDataAvailable(const ShortcutInfo& info, ...@@ -168,7 +168,7 @@ void AddToHomescreenManager::OnDataAvailable(const ShortcutInfo& info,
AddShortcut(info, icon); AddShortcut(info, icon);
} }
void AddToHomescreenManager::CreateInfoBarForWebAPK(const ShortcutInfo& info, void AddToHomescreenManager::CreateInfoBarForWebApk(const ShortcutInfo& info,
const SkBitmap& icon) { const SkBitmap& icon) {
banners::AppBannerInfoBarDelegateAndroid::Create( banners::AppBannerInfoBarDelegateAndroid::Create(
data_fetcher_->web_contents(), nullptr, info.user_title, data_fetcher_->web_contents(), nullptr, info.user_title,
......
...@@ -56,7 +56,7 @@ class AddToHomescreenManager : public AddToHomescreenDataFetcher::Observer { ...@@ -56,7 +56,7 @@ class AddToHomescreenManager : public AddToHomescreenDataFetcher::Observer {
// Called only when the AddToHomescreenDataFetcher has retrieved all of the // Called only when the AddToHomescreenDataFetcher has retrieved all of the
// data needed to install a WebAPK. // data needed to install a WebAPK.
void CreateInfoBarForWebAPK(const ShortcutInfo& info, const SkBitmap& icon); void CreateInfoBarForWebApk(const ShortcutInfo& info, const SkBitmap& icon);
void RecordAddToHomescreen(); void RecordAddToHomescreen();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment