| OLD | NEW |
| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 182 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 183 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 183 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
| 184 #endif | 184 #endif |
| 185 | 185 |
| 186 #if defined(OS_ANDROID) | 186 #if defined(OS_ANDROID) |
| 187 #include "ui/base/ui_base_paths.h" | 187 #include "ui/base/ui_base_paths.h" |
| 188 #include "ui/gfx/android/device_display_info.h" | 188 #include "ui/gfx/android/device_display_info.h" |
| 189 #endif | 189 #endif |
| 190 | 190 |
| 191 #if defined(USE_NSS) | 191 #if defined(USE_NSS) |
| 192 #include "chrome/browser/ui/crypto_module_password_dialog.h" | 192 #include "chrome/browser/ui/crypto_module_delegate_nss.h" |
| 193 #endif | 193 #endif |
| 194 | 194 |
| 195 #if !defined(OS_CHROMEOS) | 195 #if !defined(OS_CHROMEOS) |
| 196 #include "chrome/browser/signin/signin_manager.h" | 196 #include "chrome/browser/signin/signin_manager.h" |
| 197 #include "chrome/browser/signin/signin_manager_factory.h" | 197 #include "chrome/browser/signin/signin_manager_factory.h" |
| 198 #endif | 198 #endif |
| 199 | 199 |
| 200 #if !defined(OS_ANDROID) | 200 #if !defined(OS_ANDROID) |
| 201 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 201 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
| 202 #endif | 202 #endif |
| (...skipping 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2615 sandbox::TargetPolicy::HANDLES_DUP_ANY, | 2615 sandbox::TargetPolicy::HANDLES_DUP_ANY, |
| 2616 L"File"); | 2616 L"File"); |
| 2617 if (result != sandbox::SBOX_ALL_OK) { | 2617 if (result != sandbox::SBOX_ALL_OK) { |
| 2618 *success = false; | 2618 *success = false; |
| 2619 return; | 2619 return; |
| 2620 } | 2620 } |
| 2621 } | 2621 } |
| 2622 #endif | 2622 #endif |
| 2623 | 2623 |
| 2624 #if defined(USE_NSS) | 2624 #if defined(USE_NSS) |
| 2625 crypto::CryptoModuleBlockingPasswordDelegate* | 2625 crypto::NSSCryptoModuleDelegate* |
| 2626 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2626 ChromeContentBrowserClient::GetKeygenCryptoModuleDelegate( |
| 2627 content::ResourceContext* context, |
| 2627 const GURL& url) { | 2628 const GURL& url) { |
| 2628 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2629 return chrome::NewNSSCryptoModuleDelegate( |
| 2629 chrome::kCryptoModulePasswordKeygen, url.host()); | 2630 context, chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2630 } | 2631 } |
| 2631 #endif | 2632 #endif |
| 2632 | 2633 |
| 2633 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( | 2634 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( |
| 2634 content::BrowserContext* browser_context, | 2635 content::BrowserContext* browser_context, |
| 2635 const GURL& url) { | 2636 const GURL& url) { |
| 2636 #if defined(ENABLE_PLUGINS) | 2637 #if defined(ENABLE_PLUGINS) |
| 2637 Profile* profile = Profile::FromBrowserContext(browser_context); | 2638 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 2638 const ExtensionSet* extension_set = NULL; | 2639 const ExtensionSet* extension_set = NULL; |
| 2639 if (profile) { | 2640 if (profile) { |
| 2640 extension_set = extensions::ExtensionSystem::Get(profile)-> | 2641 extension_set = extensions::ExtensionSystem::Get(profile)-> |
| 2641 extension_service()->extensions(); | 2642 extension_service()->extensions(); |
| 2642 } | 2643 } |
| 2643 // TODO(teravest): Populate allowed_file_handle_origins_ when FileIO is moved | 2644 // TODO(teravest): Populate allowed_file_handle_origins_ when FileIO is moved |
| 2644 // from the renderer to the browser. | 2645 // from the renderer to the browser. |
| 2645 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2646 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
| 2646 allowed_file_handle_origins_) || | 2647 allowed_file_handle_origins_) || |
| 2647 IsHostAllowedByCommandLine(url, extension_set, | 2648 IsHostAllowedByCommandLine(url, extension_set, |
| 2648 switches::kAllowNaClFileHandleAPI); | 2649 switches::kAllowNaClFileHandleAPI); |
| 2649 #else | 2650 #else |
| 2650 return false; | 2651 return false; |
| 2651 #endif | 2652 #endif |
| 2652 } | 2653 } |
| 2653 | 2654 |
| 2654 } // namespace chrome | 2655 } // namespace chrome |
| OLD | NEW |