Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 242613004: Replace NOTIFICATION_EXTENSION_LOADED to NOTIFICATION_EXTENSION_LOADED_DEPRECATED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 new ExtensionMsg_Loaded(loaded_extensions)); 1011 new ExtensionMsg_Loaded(loaded_extensions));
1012 } 1012 }
1013 } 1013 }
1014 } 1014 }
1015 1015
1016 // Tell subsystems that use the EXTENSION_LOADED notification about the new 1016 // Tell subsystems that use the EXTENSION_LOADED notification about the new
1017 // extension. 1017 // extension.
1018 // 1018 //
1019 // NOTE: It is important that this happen after notifying the renderers about 1019 // NOTE: It is important that this happen after notifying the renderers about
1020 // the new extensions so that if we navigate to an extension URL in 1020 // the new extensions so that if we navigate to an extension URL in
1021 // ExtensionRegistryObserver::OnLoaded or NOTIFICATION_EXTENSION_LOADED, the 1021 // ExtensionRegistryObserver::OnLoaded or
1022 // NOTIFICATION_EXTENSION_LOADED_DEPRECATED, the
1022 // renderer is guaranteed to know about it. 1023 // renderer is guaranteed to know about it.
1023 registry_->TriggerOnLoaded(extension); 1024 registry_->TriggerOnLoaded(extension);
1024 1025
1025 content::NotificationService::current()->Notify( 1026 content::NotificationService::current()->Notify(
1026 chrome::NOTIFICATION_EXTENSION_LOADED, 1027 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
1027 content::Source<Profile>(profile_), 1028 content::Source<Profile>(profile_),
1028 content::Details<const Extension>(extension)); 1029 content::Details<const Extension>(extension));
1029 1030
1030 // TODO(kalman): Convert ExtensionSpecialStoragePolicy to a 1031 // TODO(kalman): Convert ExtensionSpecialStoragePolicy to a
1031 // BrowserContextKeyedService and use ExtensionRegistryObserver. 1032 // BrowserContextKeyedService and use ExtensionRegistryObserver.
1032 profile_->GetExtensionSpecialStoragePolicy()-> 1033 profile_->GetExtensionSpecialStoragePolicy()->
1033 GrantRightsForExtension(extension); 1034 GrantRightsForExtension(extension);
1034 1035
1035 // TODO(kalman): This is broken. The crash reporter is process-wide so doesn't 1036 // TODO(kalman): This is broken. The crash reporter is process-wide so doesn't
1036 // work properly multi-profile. Besides which, it should be using 1037 // work properly multi-profile. Besides which, it should be using
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 void ExtensionService::UnloadAllExtensionsInternal() { 2476 void ExtensionService::UnloadAllExtensionsInternal() {
2476 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); 2477 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions();
2477 2478
2478 registry_->ClearAll(); 2479 registry_->ClearAll();
2479 system_->runtime_data()->ClearAll(); 2480 system_->runtime_data()->ClearAll();
2480 2481
2481 // TODO(erikkay) should there be a notification for this? We can't use 2482 // TODO(erikkay) should there be a notification for this? We can't use
2482 // EXTENSION_UNLOADED since that implies that the extension has been disabled 2483 // EXTENSION_UNLOADED since that implies that the extension has been disabled
2483 // or uninstalled. 2484 // or uninstalled.
2484 } 2485 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_notification_observer.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698