OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |