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

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

Issue 1201163002: Remove hotword installation code at compile time if hotwording disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Same fix for GN builds. Created 5 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 unified diff | Download patch
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)
57 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) 58 if (HotwordServiceFactory::IsHotwordAllowed(profile_))
58 AddExternalExtension(extension_misc::kHotwordSharedModuleId); 59 AddExternalExtension(extension_misc::kHotwordSharedModuleId);
60 #endif // defined(ENABLE_HOTWORDING)
59 61
60 { 62 {
61 std::string extension_id; 63 std::string extension_id;
62 if (IsEnhancedBookmarksEnabled(&extension_id)) 64 if (IsEnhancedBookmarksEnabled(&extension_id))
63 AddExternalExtension(extension_id); 65 AddExternalExtension(extension_id);
64 } 66 }
65 67
66 #if defined(OS_CHROMEOS) 68 #if defined(OS_CHROMEOS)
67 { 69 {
68 base::CommandLine* const command_line = 70 base::CommandLine* const command_line =
(...skipping 21 matching lines...) Expand all
90 void ExternalComponentLoader::AddExternalExtension( 92 void ExternalComponentLoader::AddExternalExtension(
91 const std::string& extension_id) { 93 const std::string& extension_id) {
92 if (!IsComponentExtensionWhitelisted(extension_id)) 94 if (!IsComponentExtensionWhitelisted(extension_id))
93 return; 95 return;
94 96
95 prefs_->SetString(extension_id + ".external_update_url", 97 prefs_->SetString(extension_id + ".external_update_url",
96 extension_urls::GetWebstoreUpdateUrl().spec()); 98 extension_urls::GetWebstoreUpdateUrl().spec());
97 } 99 }
98 100
99 } // namespace extensions 101 } // namespace extensions
OLDNEW
« build/config/BUILD.gn ('K') | « chrome/browser/BUILD.gn ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698