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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 468913006: Added extension macro checks for android plugin files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: #ifdef'ed out entire GetExtensionInfoMap function Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/nacl_host/nacl_browser_delegate_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 } 2310 }
2311 #endif 2311 #endif
2312 return NULL; 2312 return NULL;
2313 } 2313 }
2314 2314
2315 bool ChromeContentBrowserClient::AllowPepperSocketAPI( 2315 bool ChromeContentBrowserClient::AllowPepperSocketAPI(
2316 content::BrowserContext* browser_context, 2316 content::BrowserContext* browser_context,
2317 const GURL& url, 2317 const GURL& url,
2318 bool private_api, 2318 bool private_api,
2319 const content::SocketPermissionRequest* params) { 2319 const content::SocketPermissionRequest* params) {
2320 #if defined(ENABLE_PLUGINS) 2320 #if defined(ENABLE_EXTENSIONS)
2321 Profile* profile = Profile::FromBrowserContext(browser_context); 2321 Profile* profile = Profile::FromBrowserContext(browser_context);
2322 const extensions::ExtensionSet* extension_set = NULL; 2322 const extensions::ExtensionSet* extension_set = NULL;
2323 if (profile) { 2323 if (profile) {
2324 const ExtensionService* ext_service = 2324 const ExtensionService* ext_service =
2325 extensions::ExtensionSystem::Get(profile)->extension_service(); 2325 extensions::ExtensionSystem::Get(profile)->extension_service();
2326 if (ext_service) { 2326 if (ext_service) {
2327 extension_set = ext_service->extensions(); 2327 extension_set = ext_service->extensions();
2328 } 2328 }
2329 } 2329 }
2330 2330
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 #endif 2526 #endif
2527 2527
2528 content::DevToolsManagerDelegate* 2528 content::DevToolsManagerDelegate*
2529 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { 2529 ChromeContentBrowserClient::GetDevToolsManagerDelegate() {
2530 return new ChromeDevToolsManagerDelegate(); 2530 return new ChromeDevToolsManagerDelegate();
2531 } 2531 }
2532 2532
2533 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( 2533 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle(
2534 content::BrowserContext* browser_context, 2534 content::BrowserContext* browser_context,
2535 const GURL& url) { 2535 const GURL& url) {
2536 #if defined(ENABLE_PLUGINS) 2536 #if defined(ENABLE_EXTENSIONS)
2537 Profile* profile = Profile::FromBrowserContext(browser_context); 2537 Profile* profile = Profile::FromBrowserContext(browser_context);
2538 const extensions::ExtensionSet* extension_set = NULL; 2538 const extensions::ExtensionSet* extension_set = NULL;
2539 if (profile) { 2539 if (profile) {
2540 const ExtensionService* ext_service = 2540 const ExtensionService* ext_service =
2541 extensions::ExtensionSystem::Get(profile)->extension_service(); 2541 extensions::ExtensionSystem::Get(profile)->extension_service();
2542 if (ext_service) { 2542 if (ext_service) {
2543 extension_set = ext_service->extensions(); 2543 extension_set = ext_service->extensions();
2544 } 2544 }
2545 } 2545 }
2546 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, 2546 return IsExtensionOrSharedModuleWhitelisted(url, extension_set,
2547 allowed_file_handle_origins_) || 2547 allowed_file_handle_origins_) ||
2548 IsHostAllowedByCommandLine(url, extension_set, 2548 IsHostAllowedByCommandLine(url, extension_set,
2549 switches::kAllowNaClFileHandleAPI); 2549 switches::kAllowNaClFileHandleAPI);
2550 #else 2550 #else
2551 return false; 2551 return false;
2552 #endif 2552 #endif
2553 } 2553 }
2554 2554
2555 bool ChromeContentBrowserClient::IsPluginAllowedToUseDevChannelAPIs( 2555 bool ChromeContentBrowserClient::IsPluginAllowedToUseDevChannelAPIs(
2556 content::BrowserContext* browser_context, 2556 content::BrowserContext* browser_context,
2557 const GURL& url) { 2557 const GURL& url) {
2558 #if defined(ENABLE_PLUGINS) 2558 #if defined(ENABLE_EXTENSIONS)
2559 // Allow access for tests. 2559 // Allow access for tests.
2560 if (CommandLine::ForCurrentProcess()->HasSwitch( 2560 if (CommandLine::ForCurrentProcess()->HasSwitch(
2561 switches::kEnablePepperTesting)) { 2561 switches::kEnablePepperTesting)) {
2562 return true; 2562 return true;
2563 } 2563 }
2564 2564
2565 Profile* profile = Profile::FromBrowserContext(browser_context); 2565 Profile* profile = Profile::FromBrowserContext(browser_context);
2566 const extensions::ExtensionSet* extension_set = NULL; 2566 const extensions::ExtensionSet* extension_set = NULL;
2567 if (profile) { 2567 if (profile) {
2568 const ExtensionService* ext_service = 2568 const ExtensionService* ext_service =
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 switches::kDisableWebRtcEncryption, 2616 switches::kDisableWebRtcEncryption,
2617 }; 2617 };
2618 to_command_line->CopySwitchesFrom(from_command_line, 2618 to_command_line->CopySwitchesFrom(from_command_line,
2619 kWebRtcDevSwitchNames, 2619 kWebRtcDevSwitchNames,
2620 arraysize(kWebRtcDevSwitchNames)); 2620 arraysize(kWebRtcDevSwitchNames));
2621 } 2621 }
2622 } 2622 }
2623 #endif // defined(ENABLE_WEBRTC) 2623 #endif // defined(ENABLE_WEBRTC)
2624 2624
2625 } // namespace chrome 2625 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/nacl_host/nacl_browser_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698