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

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

Issue 2172043002: chrome/browser/extensions: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_management.h" 5 #include "chrome/browser/extensions/extension_management.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 const Extension* extension) const { 212 const Extension* extension) const {
213 // Only api permissions are supported currently. 213 // Only api permissions are supported currently.
214 return std::unique_ptr<const PermissionSet>(new PermissionSet( 214 return std::unique_ptr<const PermissionSet>(new PermissionSet(
215 GetBlockedAPIPermissions(extension), ManifestPermissionSet(), 215 GetBlockedAPIPermissions(extension), ManifestPermissionSet(),
216 URLPatternSet(), URLPatternSet())); 216 URLPatternSet(), URLPatternSet()));
217 } 217 }
218 218
219 bool ExtensionManagement::IsPermissionSetAllowed( 219 bool ExtensionManagement::IsPermissionSetAllowed(
220 const Extension* extension, 220 const Extension* extension,
221 const PermissionSet& perms) const { 221 const PermissionSet& perms) const {
222 for (const auto& blocked_api : GetBlockedAPIPermissions(extension)) { 222 for (auto* blocked_api : GetBlockedAPIPermissions(extension)) {
223 if (perms.HasAPIPermission(blocked_api->id())) 223 if (perms.HasAPIPermission(blocked_api->id()))
224 return false; 224 return false;
225 } 225 }
226 return true; 226 return true;
227 } 227 }
228 228
229 bool ExtensionManagement::CheckMinimumVersion( 229 bool ExtensionManagement::CheckMinimumVersion(
230 const Extension* extension, 230 const Extension* extension,
231 std::string* required_version) const { 231 std::string* required_version) const {
232 auto iter = settings_by_id_.find(extension->id()); 232 auto iter = settings_by_id_.find(extension->id());
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 content::BrowserContext* context) const { 494 content::BrowserContext* context) const {
495 return chrome::GetBrowserContextRedirectedInIncognito(context); 495 return chrome::GetBrowserContextRedirectedInIncognito(context);
496 } 496 }
497 497
498 void ExtensionManagementFactory::RegisterProfilePrefs( 498 void ExtensionManagementFactory::RegisterProfilePrefs(
499 user_prefs::PrefRegistrySyncable* user_prefs) { 499 user_prefs::PrefRegistrySyncable* user_prefs) {
500 user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement); 500 user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement);
501 } 501 }
502 502
503 } // namespace extensions 503 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_extensions_browser_client.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698