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

Side by Side Diff: chrome/renderer/extensions/renderer_permissions_policy_delegate.cc

Issue 23819020: Gives ChromeVox access to the web store again. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 3 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/renderer/extensions/renderer_permissions_policy_delegate.h" 5 #include "chrome/renderer/extensions/renderer_permissions_policy_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/extensions/extension_constants.h" 9 #include "chrome/common/extensions/extension_constants.h"
10 #include "chrome/common/extensions/extension_manifest_constants.h" 10 #include "chrome/common/extensions/extension_manifest_constants.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 bool RendererPermissionsPolicyDelegate::CanExecuteScriptOnPage( 25 bool RendererPermissionsPolicyDelegate::CanExecuteScriptOnPage(
26 const Extension* extension, 26 const Extension* extension,
27 const GURL& document_url, 27 const GURL& document_url,
28 const GURL& top_document_url, 28 const GURL& top_document_url,
29 int tab_id, 29 int tab_id,
30 const UserScript* script, 30 const UserScript* script,
31 int process_id, 31 int process_id,
32 std::string* error) { 32 std::string* error) {
33 #if defined(OS_CHROMEOS)
34 if (extension->id() == extension_misc::kChromeVoxExtensionId)
dmazzoni 2013/09/05 06:13:55 Could we iterate over ExtensionConfig::get()->whit
Matt Perry 2013/09/05 18:54:29 Sounds reasonable.
35 return true;
36 #endif
37
33 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSigninProcess)) { 38 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSigninProcess)) {
34 if (error) 39 if (error)
35 *error = errors::kCannotScriptSigninPage; 40 *error = errors::kCannotScriptSigninPage;
36 return false; 41 return false;
37 } 42 }
38 43
39 if (dispatcher_->IsExtensionActive(extension_misc::kWebStoreAppId)) { 44 if (dispatcher_->IsExtensionActive(extension_misc::kWebStoreAppId)) {
40 if (error) 45 if (error)
41 *error = errors::kCannotScriptGallery; 46 *error = errors::kCannotScriptGallery;
42 return false; 47 return false;
43 } 48 }
44 49
45 return true; 50 return true;
46 } 51 }
47 52
48 } // namespace extensions 53 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698