| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 std::string hotword_id = extension_misc::kHotwordExtensionId; | 60 std::string hotword_id = extension_misc::kHotwordExtensionId; |
| 61 if (HotwordService::IsExperimentalHotwordingEnabled()) { | 61 if (HotwordService::IsExperimentalHotwordingEnabled()) { |
| 62 hotword_id = extension_misc::kHotwordSharedModuleId; | 62 hotword_id = extension_misc::kHotwordSharedModuleId; |
| 63 } | 63 } |
| 64 prefs_->SetString(hotword_id + ".external_update_url", | 64 prefs_->SetString(hotword_id + ".external_update_url", |
| 65 extension_urls::GetWebstoreUpdateUrl().spec()); | 65 extension_urls::GetWebstoreUpdateUrl().spec()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 { | 68 { |
| 69 std::string extension_id; | 69 std::string extension_id; |
| 70 if (GetBookmarksExperimentExtensionID(&extension_id)) { | 70 if (IsEnhancedBookmarksEnabled(&extension_id)) { |
| 71 prefs_->SetString(extension_id + ".external_update_url", | 71 prefs_->SetString(extension_id + ".external_update_url", |
| 72 extension_urls::GetWebstoreUpdateUrl().spec()); | 72 extension_urls::GetWebstoreUpdateUrl().spec()); |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 #if defined(OS_CHROMEOS) | 76 #if defined(OS_CHROMEOS) |
| 77 { | 77 { |
| 78 base::CommandLine* const command_line = | 78 base::CommandLine* const command_line = |
| 79 base::CommandLine::ForCurrentProcess(); | 79 base::CommandLine::ForCurrentProcess(); |
| 80 if (!command_line->HasSwitch(chromeos::switches::kDisableNewZIPUnpacker)) { | 80 if (!command_line->HasSwitch(chromeos::switches::kDisableNewZIPUnpacker)) { |
| 81 const std::string extension_id = extension_misc::kZIPUnpackerExtensionId; | 81 const std::string extension_id = extension_misc::kZIPUnpackerExtensionId; |
| 82 prefs_->SetString(extension_id + ".external_update_url", | 82 prefs_->SetString(extension_id + ".external_update_url", |
| 83 extension_urls::GetWebstoreUpdateUrl().spec()); | 83 extension_urls::GetWebstoreUpdateUrl().spec()); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 #if defined(ENABLE_APP_LIST) && defined(OS_CHROMEOS) | 88 #if defined(ENABLE_APP_LIST) && defined(OS_CHROMEOS) |
| 89 std::string google_now_extension_id; | 89 std::string google_now_extension_id; |
| 90 if (GetGoogleNowExtensionId(&google_now_extension_id)) { | 90 if (GetGoogleNowExtensionId(&google_now_extension_id)) { |
| 91 prefs_->SetString(google_now_extension_id + ".external_update_url", | 91 prefs_->SetString(google_now_extension_id + ".external_update_url", |
| 92 extension_urls::GetWebstoreUpdateUrl().spec()); | 92 extension_urls::GetWebstoreUpdateUrl().spec()); |
| 93 } | 93 } |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 LoadFinished(); | 96 LoadFinished(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace extensions | 99 } // namespace extensions |
| OLD | NEW |