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 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 sandbox::TargetPolicy::HANDLES_DUP_ANY, | 2599 sandbox::TargetPolicy::HANDLES_DUP_ANY, |
2600 L"File"); | 2600 L"File"); |
2601 if (result != sandbox::SBOX_ALL_OK) { | 2601 if (result != sandbox::SBOX_ALL_OK) { |
2602 *success = false; | 2602 *success = false; |
2603 return; | 2603 return; |
2604 } | 2604 } |
2605 } | 2605 } |
2606 #endif | 2606 #endif |
2607 | 2607 |
2608 #if defined(USE_NSS) | 2608 #if defined(USE_NSS) |
2609 crypto::CryptoModuleBlockingPasswordDelegate* | 2609 crypto::NSSCryptoModuleDelegate* |
2610 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2610 ChromeContentBrowserClient::GetKeygenCryptoModuleDelegate( |
| 2611 content::ResourceContext* context, |
2611 const GURL& url) { | 2612 const GURL& url) { |
2612 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2613 return chrome::CreateNSSCryptoModuleDelegate( |
2613 chrome::kCryptoModulePasswordKeygen, url.host()); | 2614 context, chrome::kCryptoModulePasswordKeygen, url.host()); |
2614 } | 2615 } |
2615 #endif | 2616 #endif |
2616 | 2617 |
2617 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( | 2618 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( |
2618 content::BrowserContext* browser_context, | 2619 content::BrowserContext* browser_context, |
2619 const GURL& url) { | 2620 const GURL& url) { |
2620 #if defined(ENABLE_PLUGINS) | 2621 #if defined(ENABLE_PLUGINS) |
2621 Profile* profile = Profile::FromBrowserContext(browser_context); | 2622 Profile* profile = Profile::FromBrowserContext(browser_context); |
2622 const ExtensionSet* extension_set = NULL; | 2623 const ExtensionSet* extension_set = NULL; |
2623 if (profile) { | 2624 if (profile) { |
2624 extension_set = extensions::ExtensionSystem::Get(profile)-> | 2625 extension_set = extensions::ExtensionSystem::Get(profile)-> |
2625 extension_service()->extensions(); | 2626 extension_service()->extensions(); |
2626 } | 2627 } |
2627 // TODO(teravest): Populate allowed_file_handle_origins_ when FileIO is moved | 2628 // TODO(teravest): Populate allowed_file_handle_origins_ when FileIO is moved |
2628 // from the renderer to the browser. | 2629 // from the renderer to the browser. |
2629 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2630 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
2630 allowed_file_handle_origins_) || | 2631 allowed_file_handle_origins_) || |
2631 IsHostAllowedByCommandLine(url, extension_set, | 2632 IsHostAllowedByCommandLine(url, extension_set, |
2632 switches::kAllowNaClFileHandleAPI); | 2633 switches::kAllowNaClFileHandleAPI); |
2633 #else | 2634 #else |
2634 return false; | 2635 return false; |
2635 #endif | 2636 #endif |
2636 } | 2637 } |
2637 | 2638 |
2638 } // namespace chrome | 2639 } // namespace chrome |
OLD | NEW |