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

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

Issue 23636002: Fixed how Apps Developer Tools is enabled/disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 extensions_.Remove(extension->id()); 1954 extensions_.Remove(extension->id());
1955 NotifyExtensionUnloaded(extension.get(), reason); 1955 NotifyExtensionUnloaded(extension.get(), reason);
1956 } 1956 }
1957 1957
1958 content::NotificationService::current()->Notify( 1958 content::NotificationService::current()->Notify(
1959 chrome::NOTIFICATION_EXTENSION_REMOVED, 1959 chrome::NOTIFICATION_EXTENSION_REMOVED,
1960 content::Source<Profile>(profile_), 1960 content::Source<Profile>(profile_),
1961 content::Details<const Extension>(extension.get())); 1961 content::Details<const Extension>(extension.get()));
1962 } 1962 }
1963 1963
1964 void ExtensionService::RemoveComponentExtension(
1965 const std::string& extension_id) {
1966 scoped_refptr<const Extension> extension(
1967 GetExtensionById(extension_id, false));
1968 UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_UNINSTALL);
1969 content::NotificationService::current()->Notify(
1970 chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
1971 content::Source<Profile>(profile_),
1972 content::Details<const Extension>(extension.get()));
1973 }
1974
1964 void ExtensionService::UnloadAllExtensions() { 1975 void ExtensionService::UnloadAllExtensions() {
1965 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); 1976 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions();
1966 1977
1967 extensions_.Clear(); 1978 extensions_.Clear();
1968 disabled_extensions_.Clear(); 1979 disabled_extensions_.Clear();
1969 terminated_extensions_.Clear(); 1980 terminated_extensions_.Clear();
1970 extension_runtime_data_.clear(); 1981 extension_runtime_data_.clear();
1971 1982
1972 // TODO(erikkay) should there be a notification for this? We can't use 1983 // TODO(erikkay) should there be a notification for this? We can't use
1973 // EXTENSION_UNLOADED since that implies that the extension has been disabled 1984 // EXTENSION_UNLOADED since that implies that the extension has been disabled
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
3163 } 3174 }
3164 3175
3165 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { 3176 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) {
3166 update_observers_.AddObserver(observer); 3177 update_observers_.AddObserver(observer);
3167 } 3178 }
3168 3179
3169 void ExtensionService::RemoveUpdateObserver( 3180 void ExtensionService::RemoveUpdateObserver(
3170 extensions::UpdateObserver* observer) { 3181 extensions::UpdateObserver* observer) {
3171 update_observers_.RemoveObserver(observer); 3182 update_observers_.RemoveObserver(observer);
3172 } 3183 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/extensions/install_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698