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" |
11 #include "chrome/browser/search/hotword_service_factory.h" | 11 #include "chrome/browser/search/hotword_service_factory.h" |
12 #include "chrome/browser/signin/signin_manager_factory.h" | 12 #include "chrome/browser/signin/signin_manager_factory.h" |
13 #include "chrome/common/extensions/extension_constants.h" | 13 #include "chrome/common/extensions/extension_constants.h" |
14 #include "components/signin/core/browser/signin_manager.h" | 14 #include "components/signin/core/browser/signin_manager.h" |
15 #include "extensions/common/extension.h" | 15 #include "extensions/common/extension.h" |
16 #include "extensions/common/extension_urls.h" | 16 #include "extensions/common/extension_urls.h" |
17 #include "extensions/common/features/simple_feature.h" | 17 #include "extensions/common/features/simple_feature.h" |
18 | 18 |
19 #if defined(OS_CHROMEOS) | 19 #if defined(OS_CHROMEOS) |
20 #include "base/command_line.h" | 20 #include "base/command_line.h" |
21 #include "chromeos/chromeos_switches.h" | 21 #include "chromeos/chromeos_switches.h" |
22 #endif | 22 #endif |
23 | 23 |
24 #if defined(ENABLE_APP_LIST) && defined(OS_CHROMEOS) | |
benwells
2015/02/10 22:34:01
I think this can just be #if defined(OS_CHROMEOS).
robliao
2015/02/10 22:37:53
We're still gated by the gyp file with regards to
| |
25 #include "chrome/browser/ui/app_list/app_list_extension.h" | |
26 #endif | |
27 | |
24 namespace extensions { | 28 namespace extensions { |
25 | 29 |
26 ExternalComponentLoader::ExternalComponentLoader(Profile* profile) | 30 ExternalComponentLoader::ExternalComponentLoader(Profile* profile) |
27 : profile_(profile) { | 31 : profile_(profile) { |
28 } | 32 } |
29 | 33 |
30 ExternalComponentLoader::~ExternalComponentLoader() {} | 34 ExternalComponentLoader::~ExternalComponentLoader() {} |
31 | 35 |
32 // static | 36 // static |
33 bool ExternalComponentLoader::IsModifiable(const Extension* extension) { | 37 bool ExternalComponentLoader::IsModifiable(const Extension* extension) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 base::CommandLine* const command_line = | 82 base::CommandLine* const command_line = |
79 base::CommandLine::ForCurrentProcess(); | 83 base::CommandLine::ForCurrentProcess(); |
80 if (!command_line->HasSwitch(chromeos::switches::kDisableNewZIPUnpacker)) { | 84 if (!command_line->HasSwitch(chromeos::switches::kDisableNewZIPUnpacker)) { |
81 const std::string extension_id = extension_misc::kZIPUnpackerExtensionId; | 85 const std::string extension_id = extension_misc::kZIPUnpackerExtensionId; |
82 prefs_->SetString(extension_id + ".external_update_url", | 86 prefs_->SetString(extension_id + ".external_update_url", |
83 extension_urls::GetWebstoreUpdateUrl().spec()); | 87 extension_urls::GetWebstoreUpdateUrl().spec()); |
84 } | 88 } |
85 } | 89 } |
86 #endif | 90 #endif |
87 | 91 |
92 #if defined(ENABLE_APP_LIST) && defined(OS_CHROMEOS) | |
93 std::string app_list_extension_id; | |
94 if (GetAppListExtensionId(&app_list_extension_id)) { | |
95 prefs_->SetString(app_list_extension_id + ".external_update_url", | |
96 extension_urls::GetWebstoreUpdateUrl().spec()); | |
97 } | |
98 #endif | |
99 | |
88 LoadFinished(); | 100 LoadFinished(); |
89 } | 101 } |
90 | 102 |
91 } // namespace extensions | 103 } // namespace extensions |
OLD | NEW |