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

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

Issue 1150683007: [Extensions] Use document url (not top url) for tab-specific permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser_permissions_policy_delegate.h" 5 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "extensions/common/manifest_constants.h" 11 #include "extensions/common/manifest_constants.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 namespace errors = manifest_errors; 15 namespace errors = manifest_errors;
16 16
17 BrowserPermissionsPolicyDelegate::BrowserPermissionsPolicyDelegate() { 17 BrowserPermissionsPolicyDelegate::BrowserPermissionsPolicyDelegate() {
18 PermissionsData::SetPolicyDelegate(this); 18 PermissionsData::SetPolicyDelegate(this);
19 } 19 }
20 BrowserPermissionsPolicyDelegate::~BrowserPermissionsPolicyDelegate() { 20 BrowserPermissionsPolicyDelegate::~BrowserPermissionsPolicyDelegate() {
21 PermissionsData::SetPolicyDelegate(NULL); 21 PermissionsData::SetPolicyDelegate(NULL);
22 } 22 }
23 23
24 bool BrowserPermissionsPolicyDelegate::CanExecuteScriptOnPage( 24 bool BrowserPermissionsPolicyDelegate::CanExecuteScriptOnPage(
25 const Extension* extension, 25 const Extension* extension,
26 const GURL& document_url, 26 const GURL& document_url,
27 const GURL& top_document_url,
28 int tab_id, 27 int tab_id,
29 int process_id, 28 int process_id,
30 std::string* error) { 29 std::string* error) {
31 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 30 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
32 return true; 31 return true;
33 } 32 }
34 33
35 } // namespace extensions 34 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/browser_permissions_policy_delegate.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698