| 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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 | 1130 |
| 1128 extensions::SettingsFrontend* ExtensionService::settings_frontend() { | 1131 extensions::SettingsFrontend* ExtensionService::settings_frontend() { |
| 1129 return settings_frontend_.get(); | 1132 return settings_frontend_.get(); |
| 1130 } | 1133 } |
| 1131 | 1134 |
| 1132 ExtensionContentSettingsStore* | 1135 ExtensionContentSettingsStore* |
| 1133 ExtensionService::GetExtensionContentSettingsStore() { | 1136 ExtensionService::GetExtensionContentSettingsStore() { |
| 1134 return extension_prefs()->content_settings_store(); | 1137 return extension_prefs()->content_settings_store(); |
| 1135 } | 1138 } |
| 1136 | 1139 |
| 1140 bool ExtensionService::is_ready() { |
| 1141 return ready_; |
| 1142 } |
| 1143 |
| 1137 ExtensionUpdater* ExtensionService::updater() { | 1144 ExtensionUpdater* ExtensionService::updater() { |
| 1138 return updater_.get(); | 1145 return updater_.get(); |
| 1139 } | 1146 } |
| 1140 | 1147 |
| 1141 void ExtensionService::CheckAdminBlacklist() { | 1148 void ExtensionService::CheckAdminBlacklist() { |
| 1142 std::vector<std::string> to_be_removed; | 1149 std::vector<std::string> to_be_removed; |
| 1143 // Loop through extensions list, unload installed extensions. | 1150 // Loop through extensions list, unload installed extensions. |
| 1144 for (ExtensionList::const_iterator iter = extensions_.begin(); | 1151 for (ExtensionList::const_iterator iter = extensions_.begin(); |
| 1145 iter != extensions_.end(); ++iter) { | 1152 iter != extensions_.end(); ++iter) { |
| 1146 const Extension* extension = (*iter); | 1153 const Extension* extension = (*iter); |
| (...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2502 | 2509 |
| 2503 ExtensionService::NaClModuleInfoList::iterator | 2510 ExtensionService::NaClModuleInfoList::iterator |
| 2504 ExtensionService::FindNaClModule(const GURL& url) { | 2511 ExtensionService::FindNaClModule(const GURL& url) { |
| 2505 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2512 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2506 iter != nacl_module_list_.end(); ++iter) { | 2513 iter != nacl_module_list_.end(); ++iter) { |
| 2507 if (iter->url == url) | 2514 if (iter->url == url) |
| 2508 return iter; | 2515 return iter; |
| 2509 } | 2516 } |
| 2510 return nacl_module_list_.end(); | 2517 return nacl_module_list_.end(); |
| 2511 } | 2518 } |
| OLD | NEW |