summaryrefslogtreecommitdiffstats
path: root/extensions/common/permissions
diff options
context:
space:
mode:
authorrob <rob@robwu.nl>2016-01-25 11:41:08 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-25 19:53:47 +0000
commit889ceeb78a6745727ca8db2d26866a913fe2e02c (patch)
tree6cd61bb1b115e3d7701e3c33b57ca63658ec2d6b /extensions/common/permissions
parent0bbef05dd7107caea30ae4a075b242296bb795aa (diff)
downloadchromium_src-889ceeb78a6745727ca8db2d26866a913fe2e02c.zip
chromium_src-889ceeb78a6745727ca8db2d26866a913fe2e02c.tar.gz
chromium_src-889ceeb78a6745727ca8db2d26866a913fe2e02c.tar.bz2
Remove unused process_id parameter from permissions_data
The process ID was introduced in crbug.com/220039, and used to protect the signin process, but this special process was removed as a part of crbug.com/350202. There are no other uses for the process ID, so remove it. BUG=379356 TEST=still compiles Review URL: https://codereview.chromium.org/1622403002 Cr-Commit-Position: refs/heads/master@{#371282}
Diffstat (limited to 'extensions/common/permissions')
-rw-r--r--extensions/common/permissions/permissions_data.cc17
-rw-r--r--extensions/common/permissions/permissions_data.h6
2 files changed, 6 insertions, 17 deletions
diff --git a/extensions/common/permissions/permissions_data.cc b/extensions/common/permissions/permissions_data.cc
index 8fa22f4..d3634d35 100644
--- a/extensions/common/permissions/permissions_data.cc
+++ b/extensions/common/permissions/permissions_data.cc
@@ -232,11 +232,10 @@ bool PermissionsData::HasWithheldImpliedAllHosts() const {
bool PermissionsData::CanAccessPage(const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) const {
base::AutoLock auto_lock(runtime_lock_);
AccessType result =
- CanRunOnPage(extension, document_url, tab_id, process_id,
+ CanRunOnPage(extension, document_url, tab_id,
active_permissions_unsafe_->explicit_hosts(),
withheld_permissions_unsafe_->explicit_hosts(), error);
// TODO(rdevlin.cronin) Update callers so that they only need ACCESS_ALLOWED.
@@ -247,10 +246,9 @@ PermissionsData::AccessType PermissionsData::GetPageAccess(
const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) const {
base::AutoLock auto_lock(runtime_lock_);
- return CanRunOnPage(extension, document_url, tab_id, process_id,
+ return CanRunOnPage(extension, document_url, tab_id,
active_permissions_unsafe_->explicit_hosts(),
withheld_permissions_unsafe_->explicit_hosts(), error);
}
@@ -258,11 +256,10 @@ PermissionsData::AccessType PermissionsData::GetPageAccess(
bool PermissionsData::CanRunContentScriptOnPage(const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) const {
base::AutoLock auto_lock(runtime_lock_);
AccessType result =
- CanRunOnPage(extension, document_url, tab_id, process_id,
+ CanRunOnPage(extension, document_url, tab_id,
active_permissions_unsafe_->scriptable_hosts(),
withheld_permissions_unsafe_->scriptable_hosts(), error);
// TODO(rdevlin.cronin) Update callers so that they only need ACCESS_ALLOWED.
@@ -273,10 +270,9 @@ PermissionsData::AccessType PermissionsData::GetContentScriptAccess(
const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) const {
base::AutoLock auto_lock(runtime_lock_);
- return CanRunOnPage(extension, document_url, tab_id, process_id,
+ return CanRunOnPage(extension, document_url, tab_id,
active_permissions_unsafe_->scriptable_hosts(),
withheld_permissions_unsafe_->scriptable_hosts(), error);
}
@@ -333,14 +329,13 @@ PermissionsData::AccessType PermissionsData::CanRunOnPage(
const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
const URLPatternSet& permitted_url_patterns,
const URLPatternSet& withheld_url_patterns,
std::string* error) const {
runtime_lock_.AssertAcquired();
if (g_policy_delegate &&
- !g_policy_delegate->CanExecuteScriptOnPage(
- extension, document_url, tab_id, process_id, error)) {
+ !g_policy_delegate->CanExecuteScriptOnPage(extension, document_url,
+ tab_id, error)) {
return ACCESS_DENIED;
}
diff --git a/extensions/common/permissions/permissions_data.h b/extensions/common/permissions/permissions_data.h
index a78a0c1..bb8e51e 100644
--- a/extensions/common/permissions/permissions_data.h
+++ b/extensions/common/permissions/permissions_data.h
@@ -59,7 +59,6 @@ class PermissionsData {
virtual bool CanExecuteScriptOnPage(const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) = 0;
};
@@ -153,7 +152,6 @@ class PermissionsData {
bool CanAccessPage(const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) const;
// Like CanAccessPage, but also takes withheld permissions into account.
// TODO(rdevlin.cronin) We shouldn't have two functions, but not all callers
@@ -161,7 +159,6 @@ class PermissionsData {
AccessType GetPageAccess(const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) const;
// Returns true if the |extension| has permission to inject a content script
@@ -173,7 +170,6 @@ class PermissionsData {
bool CanRunContentScriptOnPage(const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) const;
// Like CanRunContentScriptOnPage, but also takes withheld permissions into
// account.
@@ -182,7 +178,6 @@ class PermissionsData {
AccessType GetContentScriptAccess(const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
std::string* error) const;
// Returns true if extension is allowed to obtain the contents of a page as
@@ -234,7 +229,6 @@ class PermissionsData {
AccessType CanRunOnPage(const Extension* extension,
const GURL& document_url,
int tab_id,
- int process_id,
const URLPatternSet& permitted_url_patterns,
const URLPatternSet& withheld_url_patterns,
std::string* error) const;