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

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

Issue 2646803003: Rename confusing method name. (Closed)
Patch Set: Created 3 years, 11 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 // for terminated extensions being disabled. 941 // for terminated extensions being disabled.
942 registry_->AddDisabled(make_scoped_refptr(extension)); 942 registry_->AddDisabled(make_scoped_refptr(extension));
943 if (registry_->enabled_extensions().Contains(extension->id())) { 943 if (registry_->enabled_extensions().Contains(extension->id())) {
944 registry_->RemoveEnabled(extension->id()); 944 registry_->RemoveEnabled(extension->id());
945 NotifyExtensionUnloaded(extension, UnloadedExtensionInfo::REASON_DISABLE); 945 NotifyExtensionUnloaded(extension, UnloadedExtensionInfo::REASON_DISABLE);
946 } else { 946 } else {
947 registry_->RemoveTerminated(extension->id()); 947 registry_->RemoveTerminated(extension->id());
948 } 948 }
949 } 949 }
950 950
951 void ExtensionService::DisableUserExtensions( 951 void ExtensionService::DisableUserExtensionsExcept(
952 const std::vector<std::string>& except_ids) { 952 const std::vector<std::string>& except_ids) {
953 extensions::ManagementPolicy* management_policy = 953 extensions::ManagementPolicy* management_policy =
954 system_->management_policy(); 954 system_->management_policy();
955 extensions::ExtensionList to_disable; 955 extensions::ExtensionList to_disable;
956 956
957 for (const auto& extension : registry_->enabled_extensions()) { 957 for (const auto& extension : registry_->enabled_extensions()) {
958 if (management_policy->UserMayModifySettings(extension.get(), nullptr)) 958 if (management_policy->UserMayModifySettings(extension.get(), nullptr))
959 to_disable.push_back(extension); 959 to_disable.push_back(extension);
960 } 960 }
961 961
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 } 2490 }
2491 2491
2492 void ExtensionService::OnProfileDestructionStarted() { 2492 void ExtensionService::OnProfileDestructionStarted() {
2493 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2493 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2494 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2494 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2495 it != ids_to_unload.end(); 2495 it != ids_to_unload.end();
2496 ++it) { 2496 ++it) {
2497 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2497 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2498 } 2498 }
2499 } 2499 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698