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

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

Issue 686993003: [unpacker] Install the new zip unpacker extension by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated. Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/external_component_loader.cc
diff --git a/chrome/browser/extensions/external_component_loader.cc b/chrome/browser/extensions/external_component_loader.cc
index 02f744024dd6b7c2cc408504f7dacb93626552fa..84f629fc9e3065854b68da16ced625c9b300a7da 100644
--- a/chrome/browser/extensions/external_component_loader.cc
+++ b/chrome/browser/extensions/external_component_loader.cc
@@ -17,6 +17,10 @@
#include "extensions/common/extension.h"
#include "extensions/common/extension_urls.h"
+#if defined(OS_CHROMEOS)
+#include "chromeos/chromeos_switches.h"
+#endif
+
namespace extensions {
ExternalComponentLoader::ExternalComponentLoader(Profile* profile)
@@ -43,29 +47,43 @@ bool ExternalComponentLoader::IsModifiable(const Extension* extension) {
}
void ExternalComponentLoader::StartLoading() {
+ CommandLine* const command_line = CommandLine::ForCurrentProcess();
+
prefs_.reset(new base::DictionaryValue());
- std::string appId = extension_misc::kInAppPaymentsSupportAppId;
- prefs_->SetString(appId + ".external_update_url",
+ std::string app_id = extension_misc::kInAppPaymentsSupportAppId;
+ prefs_->SetString(app_id + ".external_update_url",
extension_urls::GetWebstoreUpdateUrl().spec());
if (HotwordServiceFactory::IsHotwordAllowed(profile_)) {
- std::string hotwordId = extension_misc::kHotwordExtensionId;
- CommandLine* command_line = CommandLine::ForCurrentProcess();
+ std::string hotword_id = extension_misc::kHotwordExtensionId;
if (command_line->HasSwitch(switches::kEnableExperimentalHotwording)) {
- hotwordId = extension_misc::kHotwordSharedModuleId;
+ hotword_id = extension_misc::kHotwordSharedModuleId;
}
- prefs_->SetString(hotwordId + ".external_update_url",
+ prefs_->SetString(hotword_id + ".external_update_url",
extension_urls::GetWebstoreUpdateUrl().spec());
}
InitBookmarksExperimentState(profile_);
- std::string ext_id;
- if (GetBookmarksExperimentExtensionID(profile_->GetPrefs(), &ext_id) &&
- !ext_id.empty()) {
- prefs_->SetString(ext_id + ".external_update_url",
- extension_urls::GetWebstoreUpdateUrl().spec());
+ {
+ std::string extension_id;
+ if (GetBookmarksExperimentExtensionID(profile_->GetPrefs(),
+ &extension_id) &&
+ !extension_id.empty()) {
+ prefs_->SetString(extension_id + ".external_update_url",
+ extension_urls::GetWebstoreUpdateUrl().spec());
+ }
+ }
+
+#if defined(OS_CHROMEOS)
+ {
+ if (!command_line->HasSwitch(chromeos::switches::kDisableNewZIPUnpacker)) {
+ const std::string extension_id = extension_misc::kZIPUnpackerExtensionId;
+ prefs_->SetString(extension_id + ".external_update_url",
+ extension_urls::GetWebstoreUpdateUrl().spec());
+ }
}
+#endif
LoadFinished();
}
« no previous file with comments | « no previous file | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698