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

Unified Diff: chrome/browser/ui/webui/app_list/start_page_handler.cc

Issue 395963002: Do not invoke SetNaClArch if the hotword extension is new enough. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/app_list/start_page_handler.cc
diff --git a/chrome/browser/ui/webui/app_list/start_page_handler.cc b/chrome/browser/ui/webui/app_list/start_page_handler.cc
index ace2cf5691a2dae99e24b6dbab4b5e88dc4034a4..184a8d94a5f05ebb62eee701c533434b6e858b00 100644
--- a/chrome/browser/ui/webui/app_list/start_page_handler.cc
+++ b/chrome/browser/ui/webui/app_list/start_page_handler.cc
@@ -177,11 +177,20 @@ void StartPageHandler::HandleInitialize(const base::ListValue* args) {
extension_registry_observer_.Add(
extensions::ExtensionRegistry::Get(profile));
}
-#endif
- web_ui()->CallJavascriptFunction(
- "appList.startPage.setNaclArch",
- base::StringValue(omaha_query_params::OmahaQueryParams::GetNaclArch()));
+ extensions::ExtensionRegistry* registry =
+ extensions::ExtensionRegistry::Get(profile);
+ const extensions::Extension* hotword_extension =
+ registry->GetExtensionById(extension_misc::kHotwordExtensionId,
+ extensions::ExtensionRegistry::ENABLED);
+ if (hotword_extension &&
+ hotword_extension->version()->CompareTo(
+ base::Version(kOldHotwordExtensionVersionString)) <= 0) {
+ web_ui()->CallJavascriptFunction(
+ "appList.startPage.setNaclArch",
+ base::StringValue(omaha_query_params::OmahaQueryParams::GetNaclArch()));
+ }
+#endif
if (!app_list::switches::IsExperimentalAppListEnabled()) {
web_ui()->CallJavascriptFunction(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698