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

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

Issue 1199343003: Revert of Remove hotword installation code at compile time if hotwording disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | no next file » | 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/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" 9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return SimpleFeature::IsIdInArray( 47 return SimpleFeature::IsIdInArray(
48 extension->id(), kEnhancedExtensions, arraysize(kEnhancedExtensions)); 48 extension->id(), kEnhancedExtensions, arraysize(kEnhancedExtensions));
49 } 49 }
50 return false; 50 return false;
51 } 51 }
52 52
53 void ExternalComponentLoader::StartLoading() { 53 void ExternalComponentLoader::StartLoading() {
54 prefs_.reset(new base::DictionaryValue()); 54 prefs_.reset(new base::DictionaryValue());
55 AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId); 55 AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId);
56 56
57 #if defined(ENABLE_HOTWORDING)
58 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) 57 if (HotwordServiceFactory::IsHotwordAllowed(profile_))
59 AddExternalExtension(extension_misc::kHotwordSharedModuleId); 58 AddExternalExtension(extension_misc::kHotwordSharedModuleId);
60 #endif // defined(ENABLE_HOTWORDING)
61 59
62 { 60 {
63 std::string extension_id; 61 std::string extension_id;
64 if (IsEnhancedBookmarksEnabled(&extension_id)) 62 if (IsEnhancedBookmarksEnabled(&extension_id))
65 AddExternalExtension(extension_id); 63 AddExternalExtension(extension_id);
66 } 64 }
67 65
68 #if defined(OS_CHROMEOS) 66 #if defined(OS_CHROMEOS)
69 { 67 {
70 base::CommandLine* const command_line = 68 base::CommandLine* const command_line =
(...skipping 21 matching lines...) Expand all
92 void ExternalComponentLoader::AddExternalExtension( 90 void ExternalComponentLoader::AddExternalExtension(
93 const std::string& extension_id) { 91 const std::string& extension_id) {
94 if (!IsComponentExtensionWhitelisted(extension_id)) 92 if (!IsComponentExtensionWhitelisted(extension_id))
95 return; 93 return;
96 94
97 prefs_->SetString(extension_id + ".external_update_url", 95 prefs_->SetString(extension_id + ".external_update_url",
98 extension_urls::GetWebstoreUpdateUrl().spec()); 96 extension_urls::GetWebstoreUpdateUrl().spec());
99 } 97 }
100 98
101 } // namespace extensions 99 } // namespace extensions
OLDNEW
« 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