Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2616)

Unified Diff: chrome/browser/extensions/extension_webstore_private_api.cc

Issue 7529011: Add a flag that lets the webstore show a different UI on app install. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed files added in separate CL (r95432) Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_webstore_private_api.cc
diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc
index 8276e815d75e6eda33c11bab6754afa6932f6a48..0f56c34f7d7c3711fa3207a82909b5a62b0c3753 100644
--- a/chrome/browser/extensions/extension_webstore_private_api.cc
+++ b/chrome/browser/extensions/extension_webstore_private_api.cc
@@ -37,6 +37,7 @@
namespace {
+const char kAppInstallBubbleKey[] = "appInstallBubble";
const char kIconDataKey[] = "iconData";
const char kIdKey[] = "id";
const char kLocalizedNameKey[] = "localizedName";
@@ -293,7 +294,8 @@ class SafeBeginInstallHelper : public UtilityProcessHost::Client {
BeginInstallWithManifestFunction::ResultCode parse_error_;
};
-BeginInstallWithManifestFunction::BeginInstallWithManifestFunction() {}
+BeginInstallWithManifestFunction::BeginInstallWithManifestFunction()
+ : use_app_installed_bubble_(false) {}
BeginInstallWithManifestFunction::~BeginInstallWithManifestFunction() {}
@@ -329,6 +331,10 @@ bool BeginInstallWithManifestFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(details->GetString(kLocalizedNameKey,
&localized_name_));
+ if (details->HasKey(kAppInstallBubbleKey))
+ EXTENSION_FUNCTION_VALIDATE(details->GetBoolean(
+ kAppInstallBubbleKey, &use_app_installed_bubble_));
+
scoped_refptr<SafeBeginInstallHelper> helper =
new SafeBeginInstallHelper(this, icon_data_, manifest_);
// The helper will call us back via OnParseSucces or OnParseFailure.
@@ -451,6 +457,7 @@ void BeginInstallWithManifestFunction::InstallUIProceed() {
CrxInstaller::WhitelistEntry* entry = new CrxInstaller::WhitelistEntry;
entry->parsed_manifest.reset(parsed_manifest_.release());
entry->localized_name = localized_name_;
+ entry->use_app_installed_bubble = use_app_installed_bubble_;
CrxInstaller::SetWhitelistEntry(id_, entry);
SetResult(ERROR_NONE);
SendResponse(true);

Powered by Google App Engine
This is Rietveld 408576698