OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 switches::kExtensionsUpdateFrequency), | 403 switches::kExtensionsUpdateFrequency), |
404 &update_frequency); | 404 &update_frequency); |
405 } | 405 } |
406 updater_.reset(new ExtensionUpdater(this, | 406 updater_.reset(new ExtensionUpdater(this, |
407 extension_prefs, | 407 extension_prefs, |
408 profile->GetPrefs(), | 408 profile->GetPrefs(), |
409 profile, | 409 profile, |
410 update_frequency)); | 410 update_frequency)); |
411 } | 411 } |
412 | 412 |
413 component_loader_.reset(new extensions::ComponentLoader(this)); | 413 component_loader_.reset( |
| 414 new extensions::ComponentLoader(this, |
| 415 profile->GetPrefs(), |
| 416 g_browser_process->local_state())); |
414 | 417 |
415 app_notification_manager_->Init(); | 418 app_notification_manager_->Init(); |
416 | 419 |
417 if (extensions_enabled_) { | 420 if (extensions_enabled_) { |
418 ExternalExtensionProviderImpl::CreateExternalProviders( | 421 ExternalExtensionProviderImpl::CreateExternalProviders( |
419 this, profile_, &external_extension_providers_); | 422 this, profile_, &external_extension_providers_); |
420 } | 423 } |
421 | 424 |
422 // Use monochrome icons for Omnibox icons. | 425 // Use monochrome icons for Omnibox icons. |
423 omnibox_popup_icon_manager_.set_monochrome(true); | 426 omnibox_popup_icon_manager_.set_monochrome(true); |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 | 1132 |
1130 extensions::SettingsFrontend* ExtensionService::settings_frontend() { | 1133 extensions::SettingsFrontend* ExtensionService::settings_frontend() { |
1131 return settings_frontend_.get(); | 1134 return settings_frontend_.get(); |
1132 } | 1135 } |
1133 | 1136 |
1134 ExtensionContentSettingsStore* | 1137 ExtensionContentSettingsStore* |
1135 ExtensionService::GetExtensionContentSettingsStore() { | 1138 ExtensionService::GetExtensionContentSettingsStore() { |
1136 return extension_prefs()->content_settings_store(); | 1139 return extension_prefs()->content_settings_store(); |
1137 } | 1140 } |
1138 | 1141 |
| 1142 bool ExtensionService::is_ready() { |
| 1143 return ready_; |
| 1144 } |
| 1145 |
1139 ExtensionUpdater* ExtensionService::updater() { | 1146 ExtensionUpdater* ExtensionService::updater() { |
1140 return updater_.get(); | 1147 return updater_.get(); |
1141 } | 1148 } |
1142 | 1149 |
1143 void ExtensionService::CheckAdminBlacklist() { | 1150 void ExtensionService::CheckAdminBlacklist() { |
1144 std::vector<std::string> to_be_removed; | 1151 std::vector<std::string> to_be_removed; |
1145 // Loop through extensions list, unload installed extensions. | 1152 // Loop through extensions list, unload installed extensions. |
1146 for (ExtensionList::const_iterator iter = extensions_.begin(); | 1153 for (ExtensionList::const_iterator iter = extensions_.begin(); |
1147 iter != extensions_.end(); ++iter) { | 1154 iter != extensions_.end(); ++iter) { |
1148 const Extension* extension = (*iter); | 1155 const Extension* extension = (*iter); |
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 | 2511 |
2505 ExtensionService::NaClModuleInfoList::iterator | 2512 ExtensionService::NaClModuleInfoList::iterator |
2506 ExtensionService::FindNaClModule(const GURL& url) { | 2513 ExtensionService::FindNaClModule(const GURL& url) { |
2507 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2514 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2508 iter != nacl_module_list_.end(); ++iter) { | 2515 iter != nacl_module_list_.end(); ++iter) { |
2509 if (iter->url == url) | 2516 if (iter->url == url) |
2510 return iter; | 2517 return iter; |
2511 } | 2518 } |
2512 return nacl_module_list_.end(); | 2519 return nacl_module_list_.end(); |
2513 } | 2520 } |
OLD | NEW |