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

Unified Diff: chrome/browser/extensions/api/autotest_private/autotest_private_api.cc

Issue 314113010: Remove deprecated permissions functions from Extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/autotest_private/autotest_private_api.cc
diff --git a/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc b/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc
index d5a3fe6c66302a8d016d1b9523bfc2be975ebc97..92ff4609d8f772d024bfb67cc20e2ca2b02f9e09 100644
--- a/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc
+++ b/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc
@@ -32,11 +32,10 @@ namespace extensions {
namespace {
base::ListValue* GetHostPermissions(const Extension* ext, bool effective_perm) {
- URLPatternSet pattern_set;
- if (effective_perm)
- pattern_set = ext->permissions_data()->GetEffectiveHostPermissions();
- else
- pattern_set = ext->GetActivePermissions()->explicit_hosts();
+ const PermissionsData* permissions_data = ext->permissions_data();
+ const URLPatternSet& pattern_set =
+ effective_perm ? permissions_data->GetEffectiveHostPermissions()
+ : permissions_data->active_permissions()->explicit_hosts();
base::ListValue* permissions = new base::ListValue;
for (URLPatternSet::const_iterator perm = pattern_set.begin();
@@ -51,7 +50,7 @@ base::ListValue* GetHostPermissions(const Extension* ext, bool effective_perm) {
base::ListValue* GetAPIPermissions(const Extension* ext) {
base::ListValue* permissions = new base::ListValue;
std::set<std::string> perm_list =
- ext->GetActivePermissions()->GetAPIsAsStrings();
+ ext->permissions_data()->active_permissions()->GetAPIsAsStrings();
for (std::set<std::string>::const_iterator perm = perm_list.begin();
perm != perm_list.end(); ++perm) {
permissions->Append(new base::StringValue(perm->c_str()));

Powered by Google App Engine
This is Rietveld 408576698