| 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/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/search/hotword_service.h" | 10 #include "chrome/browser/search/hotword_service.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 std::string app_id = extension_misc::kInAppPaymentsSupportAppId; | 55 std::string app_id = extension_misc::kInAppPaymentsSupportAppId; |
| 56 prefs_->SetString(app_id + ".external_update_url", | 56 prefs_->SetString(app_id + ".external_update_url", |
| 57 extension_urls::GetWebstoreUpdateUrl().spec()); | 57 extension_urls::GetWebstoreUpdateUrl().spec()); |
| 58 | 58 |
| 59 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) { | 59 if (HotwordServiceFactory::IsHotwordAllowed(profile_)) { |
| 60 std::string hotword_id = extension_misc::kHotwordExtensionId; | 60 std::string hotword_id = extension_misc::kHotwordSharedModuleId; |
| 61 if (HotwordService::IsExperimentalHotwordingEnabled()) { | |
| 62 hotword_id = extension_misc::kHotwordSharedModuleId; | |
| 63 } | |
| 64 prefs_->SetString(hotword_id + ".external_update_url", | 61 prefs_->SetString(hotword_id + ".external_update_url", |
| 65 extension_urls::GetWebstoreUpdateUrl().spec()); | 62 extension_urls::GetWebstoreUpdateUrl().spec()); |
| 66 } | 63 } |
| 67 | 64 |
| 68 InitBookmarksExperimentState(profile_); | 65 InitBookmarksExperimentState(profile_); |
| 69 | 66 |
| 70 { | 67 { |
| 71 std::string extension_id; | 68 std::string extension_id; |
| 72 if (GetBookmarksExperimentExtensionID(profile_->GetPrefs(), | 69 if (GetBookmarksExperimentExtensionID(profile_->GetPrefs(), |
| 73 &extension_id) && | 70 &extension_id) && |
| (...skipping 20 matching lines...) Expand all Loading... |
| 94 if (GetGoogleNowExtensionId(&google_now_extension_id)) { | 91 if (GetGoogleNowExtensionId(&google_now_extension_id)) { |
| 95 prefs_->SetString(google_now_extension_id + ".external_update_url", | 92 prefs_->SetString(google_now_extension_id + ".external_update_url", |
| 96 extension_urls::GetWebstoreUpdateUrl().spec()); | 93 extension_urls::GetWebstoreUpdateUrl().spec()); |
| 97 } | 94 } |
| 98 #endif | 95 #endif |
| 99 | 96 |
| 100 LoadFinished(); | 97 LoadFinished(); |
| 101 } | 98 } |
| 102 | 99 |
| 103 } // namespace extensions | 100 } // namespace extensions |
| OLD | NEW |