| 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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 registry_->TriggerOnLoaded(extension); | 1001 registry_->TriggerOnLoaded(extension); |
| 1002 | 1002 |
| 1003 content::NotificationService::current()->Notify( | 1003 content::NotificationService::current()->Notify( |
| 1004 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, | 1004 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, |
| 1005 content::Source<Profile>(profile_), | 1005 content::Source<Profile>(profile_), |
| 1006 content::Details<const Extension>(extension)); | 1006 content::Details<const Extension>(extension)); |
| 1007 | 1007 |
| 1008 // TODO(kalman): Convert ExtensionSpecialStoragePolicy to a | 1008 // TODO(kalman): Convert ExtensionSpecialStoragePolicy to a |
| 1009 // BrowserContextKeyedService and use ExtensionRegistryObserver. | 1009 // BrowserContextKeyedService and use ExtensionRegistryObserver. |
| 1010 profile_->GetExtensionSpecialStoragePolicy()-> | 1010 profile_->GetExtensionSpecialStoragePolicy()-> |
| 1011 GrantRightsForExtension(extension); | 1011 GrantRightsForExtension(extension, profile_); |
| 1012 | 1012 |
| 1013 // TODO(kalman): This is broken. The crash reporter is process-wide so doesn't | 1013 // TODO(kalman): This is broken. The crash reporter is process-wide so doesn't |
| 1014 // work properly multi-profile. Besides which, it should be using | 1014 // work properly multi-profile. Besides which, it should be using |
| 1015 // ExtensionRegistryObserver. See http://crbug.com/355029. | 1015 // ExtensionRegistryObserver. See http://crbug.com/355029. |
| 1016 UpdateActiveExtensionsInCrashReporter(); | 1016 UpdateActiveExtensionsInCrashReporter(); |
| 1017 | 1017 |
| 1018 const extensions::PermissionsData* permissions_data = | 1018 const extensions::PermissionsData* permissions_data = |
| 1019 extension->permissions_data(); | 1019 extension->permissions_data(); |
| 1020 | 1020 |
| 1021 // If the extension has permission to load chrome://favicon/ resources we need | 1021 // If the extension has permission to load chrome://favicon/ resources we need |
| (...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2355 } | 2355 } |
| 2356 | 2356 |
| 2357 void ExtensionService::OnProfileDestructionStarted() { | 2357 void ExtensionService::OnProfileDestructionStarted() { |
| 2358 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2358 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
| 2359 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2359 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
| 2360 it != ids_to_unload.end(); | 2360 it != ids_to_unload.end(); |
| 2361 ++it) { | 2361 ++it) { |
| 2362 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2362 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
| 2363 } | 2363 } |
| 2364 } | 2364 } |
| OLD | NEW |