| 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 bool autoupdate_enabled, | 322 bool autoupdate_enabled, |
| 323 bool extensions_enabled, | 323 bool extensions_enabled, |
| 324 extensions::OneShotEvent* ready) | 324 extensions::OneShotEvent* ready) |
| 325 : extensions::Blacklist::Observer(blacklist), | 325 : extensions::Blacklist::Observer(blacklist), |
| 326 profile_(profile), | 326 profile_(profile), |
| 327 system_(extensions::ExtensionSystem::Get(profile)), | 327 system_(extensions::ExtensionSystem::Get(profile)), |
| 328 extension_prefs_(extension_prefs), | 328 extension_prefs_(extension_prefs), |
| 329 blacklist_(blacklist), | 329 blacklist_(blacklist), |
| 330 settings_frontend_(extensions::SettingsFrontend::Create(profile)), | 330 settings_frontend_(extensions::SettingsFrontend::Create(profile)), |
| 331 extension_sync_service_(NULL), | 331 extension_sync_service_(NULL), |
| 332 registry_(new extensions::ExtensionRegistry), | 332 registry_(extensions::ExtensionRegistry::Get(profile)), |
| 333 pending_extension_manager_(*this), | 333 pending_extension_manager_(*this), |
| 334 install_directory_(install_directory), | 334 install_directory_(install_directory), |
| 335 extensions_enabled_(extensions_enabled), | 335 extensions_enabled_(extensions_enabled), |
| 336 show_extensions_prompts_(true), | 336 show_extensions_prompts_(true), |
| 337 install_updates_when_idle_(true), | 337 install_updates_when_idle_(true), |
| 338 ready_(ready), | 338 ready_(ready), |
| 339 update_once_all_providers_are_ready_(false), | 339 update_once_all_providers_are_ready_(false), |
| 340 browser_terminating_(false), | 340 browser_terminating_(false), |
| 341 installs_delayed_for_gc_(false), | 341 installs_delayed_for_gc_(false), |
| 342 is_first_run_(false) { | 342 is_first_run_(false) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 } | 415 } |
| 416 | 416 |
| 417 const ExtensionSet* ExtensionService::disabled_extensions() const { | 417 const ExtensionSet* ExtensionService::disabled_extensions() const { |
| 418 return ®istry_->disabled_extensions(); | 418 return ®istry_->disabled_extensions(); |
| 419 } | 419 } |
| 420 | 420 |
| 421 const ExtensionSet* ExtensionService::terminated_extensions() const { | 421 const ExtensionSet* ExtensionService::terminated_extensions() const { |
| 422 return ®istry_->terminated_extensions(); | 422 return ®istry_->terminated_extensions(); |
| 423 } | 423 } |
| 424 | 424 |
| 425 const ExtensionSet* ExtensionService::blacklisted_extensions() const { | |
| 426 return ®istry_->blacklisted_extensions(); | |
| 427 } | |
| 428 | |
| 429 const ExtensionSet* ExtensionService::delayed_installs() const { | 425 const ExtensionSet* ExtensionService::delayed_installs() const { |
| 430 return &delayed_installs_; | 426 return &delayed_installs_; |
| 431 } | 427 } |
| 432 | 428 |
| 433 scoped_ptr<ExtensionSet> | 429 scoped_ptr<ExtensionSet> |
| 434 ExtensionService::GenerateInstalledExtensionsSet() const { | 430 ExtensionService::GenerateInstalledExtensionsSet() const { |
| 435 scoped_ptr<ExtensionSet> installed_extensions(new ExtensionSet()); | 431 scoped_ptr<ExtensionSet> installed_extensions(new ExtensionSet()); |
| 436 installed_extensions->InsertAll(registry_->enabled_extensions()); | 432 installed_extensions->InsertAll(registry_->enabled_extensions()); |
| 437 installed_extensions->InsertAll(registry_->disabled_extensions()); | 433 installed_extensions->InsertAll(registry_->disabled_extensions()); |
| 438 installed_extensions->InsertAll(registry_->terminated_extensions()); | 434 installed_extensions->InsertAll(registry_->terminated_extensions()); |
| (...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2870 void ExtensionService::UnloadAllExtensionsInternal() { | 2866 void ExtensionService::UnloadAllExtensionsInternal() { |
| 2871 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); | 2867 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); |
| 2872 | 2868 |
| 2873 registry_->ClearAll(); | 2869 registry_->ClearAll(); |
| 2874 extension_runtime_data_.clear(); | 2870 extension_runtime_data_.clear(); |
| 2875 | 2871 |
| 2876 // TODO(erikkay) should there be a notification for this? We can't use | 2872 // TODO(erikkay) should there be a notification for this? We can't use |
| 2877 // EXTENSION_UNLOADED since that implies that the extension has been disabled | 2873 // EXTENSION_UNLOADED since that implies that the extension has been disabled |
| 2878 // or uninstalled. | 2874 // or uninstalled. |
| 2879 } | 2875 } |
| OLD | NEW |