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

Unified Diff: extensions/common/permissions/permissions_data.h

Issue 2495353003: chrome.webRequest support for ExtensionSettings (Closed)
Patch Set: Policy template translation doesn't like '&', switching to 'and'. Small fix to browser test. Created 3 years, 7 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: extensions/common/permissions/permissions_data.h
diff --git a/extensions/common/permissions/permissions_data.h b/extensions/common/permissions/permissions_data.h
index a619590a29d8b32c0c3980d36dcd6620ffe11d66..b06a0a60eedd292aec2c69ac002c1ec55910c234 100644
--- a/extensions/common/permissions/permissions_data.h
+++ b/extensions/common/permissions/permissions_data.h
@@ -263,12 +263,12 @@ class PermissionsData {
base::AutoLock auto_lock(runtime_lock_);
return GetTabSpecificPermissions(tab_id);
}
+#endif
- bool IsRuntimeBlockedHostForTesting(const GURL& url) const {
+ bool IsRuntimeBlockedHost(const GURL& url) const {
Devlin 2017/05/25 20:38:33 We should put this above for-testing methods.
nrpeter 2017/05/26 02:46:52 Done.
base::AutoLock auto_lock(runtime_lock_);
- return IsRuntimeBlockedHost(url);
+ return IsRuntimeBlockedHostUnsafe(url);
}
-#endif
private:
// Gets the tab-specific host permissions of |tab_id|, or NULL if there
@@ -296,7 +296,8 @@ class PermissionsData {
std::string* error) const;
// Check if a specific URL is blocked by policy from extension use at runtime.
- bool IsRuntimeBlockedHost(const GURL& url) const;
+ // You must acquire the runtime_lock_ before calling.
+ bool IsRuntimeBlockedHostUnsafe(const GURL& url) const;
// Same as policy_blocked_hosts but instead returns a reference.
// You must acquire runtime_lock_ before calling this.

Powered by Google App Engine
This is Rietveld 408576698