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

Side by Side Diff: chrome/browser/extensions/external_component_loader.cc

Issue 599053004: Replace placeholder extension ID for hotwording shared module with ID of module uploaded to the Chr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix HotwordService::IsServiceAvailable(). 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/hotword/constants.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/external_component_loader.h" 5 #include "chrome/browser/extensions/external_component_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" 10 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 void ExternalComponentLoader::StartLoading() { 44 void ExternalComponentLoader::StartLoading() {
45 prefs_.reset(new base::DictionaryValue()); 45 prefs_.reset(new base::DictionaryValue());
46 std::string appId = extension_misc::kInAppPaymentsSupportAppId; 46 std::string appId = extension_misc::kInAppPaymentsSupportAppId;
47 prefs_->SetString(appId + ".external_update_url", 47 prefs_->SetString(appId + ".external_update_url",
48 extension_urls::GetWebstoreUpdateUrl().spec()); 48 extension_urls::GetWebstoreUpdateUrl().spec());
49 49
50 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) { 50 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) {
51 std::string hotwordId = extension_misc::kHotwordExtensionId; 51 std::string hotwordId = extension_misc::kHotwordExtensionId;
52 CommandLine* command_line = CommandLine::ForCurrentProcess(); 52 CommandLine* command_line = CommandLine::ForCurrentProcess();
53 // TODO(amistry): Load the hotword shared module when enabling built-in 53 if (command_line->HasSwitch(switches::kEnableExperimentalHotwording)) {
54 // hotword detection. 54 hotwordId = extension_misc::kHotwordSharedModuleId;
55 if (!command_line->HasSwitch(switches::kEnableExperimentalHotwording)) {
56 prefs_->SetString(hotwordId + ".external_update_url",
57 extension_urls::GetWebstoreUpdateUrl().spec());
58 } 55 }
56 prefs_->SetString(hotwordId + ".external_update_url",
57 extension_urls::GetWebstoreUpdateUrl().spec());
59 } 58 }
60 59
61 InitBookmarksExperimentState(profile_); 60 InitBookmarksExperimentState(profile_);
62 61
63 std::string ext_id; 62 std::string ext_id;
64 if (GetBookmarksExperimentExtensionID(profile_->GetPrefs(), &ext_id) && 63 if (GetBookmarksExperimentExtensionID(profile_->GetPrefs(), &ext_id) &&
65 !ext_id.empty()) { 64 !ext_id.empty()) {
66 prefs_->SetString(ext_id + ".external_update_url", 65 prefs_->SetString(ext_id + ".external_update_url",
67 extension_urls::GetWebstoreUpdateUrl().spec()); 66 extension_urls::GetWebstoreUpdateUrl().spec());
68 } 67 }
69 68
70 LoadFinished(); 69 LoadFinished();
71 } 70 }
72 71
73 } // namespace extensions 72 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/hotword/constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698