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

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

Issue 423083002: Add new hotword extension for built-in hotword triggering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto 442183002 Created 6 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/external_component_loader.cc
diff --git a/chrome/browser/extensions/external_component_loader.cc b/chrome/browser/extensions/external_component_loader.cc
index 462ea8b6f37860f382984d1ba5639a5c3725a3d8..efed6431df1f19525f7f743f17c88e42f3ca4c96 100644
--- a/chrome/browser/extensions/external_component_loader.cc
+++ b/chrome/browser/extensions/external_component_loader.cc
@@ -4,9 +4,11 @@
#include "chrome/browser/extensions/external_component_loader.h"
+#include "base/command_line.h"
#include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/signin/signin_manager_factory.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
#include "components/signin/core/browser/signin_manager.h"
@@ -41,8 +43,13 @@ void ExternalComponentLoader::StartLoading() {
#if defined(ENABLE_EXTENSIONS)
if (HotwordServiceFactory::IsHotwordAllowed(profile_)) {
std::string hotwordId = extension_misc::kHotwordExtensionId;
- prefs_->SetString(hotwordId + ".external_update_url",
- extension_urls::GetWebstoreUpdateUrl().spec());
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ // TODO(amistry): Load the hotword shared module when enabling built-in
+ // hotword detection.
+ if (!command_line->HasSwitch(switches::kEnableBuiltInHotword)) {
+ prefs_->SetString(hotwordId + ".external_update_url",
+ extension_urls::GetWebstoreUpdateUrl().spec());
+ }
}
#endif

Powered by Google App Engine
This is Rietveld 408576698