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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
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) | |
192 #include "chrome/browser/ui/crypto_module_password_dialog.h" | |
193 #endif | |
194 | |
195 #if !defined(OS_CHROMEOS) | 191 #if !defined(OS_CHROMEOS) |
196 #include "chrome/browser/signin/signin_manager.h" | 192 #include "chrome/browser/signin/signin_manager.h" |
197 #include "chrome/browser/signin/signin_manager_factory.h" | 193 #include "chrome/browser/signin/signin_manager_factory.h" |
198 #endif | 194 #endif |
199 | 195 |
200 #if !defined(OS_ANDROID) | 196 #if !defined(OS_ANDROID) |
201 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 197 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
202 #endif | 198 #endif |
203 | 199 |
204 #if defined(ENABLE_WEBRTC) | 200 #if defined(ENABLE_WEBRTC) |
(...skipping 2408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2613 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES, | 2609 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES, |
2614 sandbox::TargetPolicy::HANDLES_DUP_ANY, | 2610 sandbox::TargetPolicy::HANDLES_DUP_ANY, |
2615 L"File"); | 2611 L"File"); |
2616 if (result != sandbox::SBOX_ALL_OK) { | 2612 if (result != sandbox::SBOX_ALL_OK) { |
2617 *success = false; | 2613 *success = false; |
2618 return; | 2614 return; |
2619 } | 2615 } |
2620 } | 2616 } |
2621 #endif | 2617 #endif |
2622 | 2618 |
2623 #if defined(USE_NSS) | |
2624 crypto::CryptoModuleBlockingPasswordDelegate* | |
2625 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | |
2626 const GURL& url) { | |
2627 return chrome::NewCryptoModuleBlockingDialogDelegate( | |
2628 chrome::kCryptoModulePasswordKeygen, url.host()); | |
2629 } | |
2630 #endif | |
2631 | |
2632 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( | 2619 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( |
2633 content::BrowserContext* browser_context, | 2620 content::BrowserContext* browser_context, |
2634 const GURL& url) { | 2621 const GURL& url) { |
2635 #if defined(ENABLE_PLUGINS) | 2622 #if defined(ENABLE_PLUGINS) |
2636 Profile* profile = Profile::FromBrowserContext(browser_context); | 2623 Profile* profile = Profile::FromBrowserContext(browser_context); |
2637 const ExtensionSet* extension_set = NULL; | 2624 const ExtensionSet* extension_set = NULL; |
2638 if (profile) { | 2625 if (profile) { |
2639 extension_set = extensions::ExtensionSystem::Get(profile)-> | 2626 extension_set = extensions::ExtensionSystem::Get(profile)-> |
2640 extension_service()->extensions(); | 2627 extension_service()->extensions(); |
2641 } | 2628 } |
2642 // TODO(teravest): Populate allowed_file_handle_origins_ when FileIO is moved | 2629 // TODO(teravest): Populate allowed_file_handle_origins_ when FileIO is moved |
2643 // from the renderer to the browser. | 2630 // from the renderer to the browser. |
2644 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2631 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
2645 allowed_file_handle_origins_) || | 2632 allowed_file_handle_origins_) || |
2646 IsHostAllowedByCommandLine(url, extension_set, | 2633 IsHostAllowedByCommandLine(url, extension_set, |
2647 switches::kAllowNaClFileHandleAPI); | 2634 switches::kAllowNaClFileHandleAPI); |
2648 #else | 2635 #else |
2649 return false; | 2636 return false; |
2650 #endif | 2637 #endif |
2651 } | 2638 } |
2652 | 2639 |
2653 } // namespace chrome | 2640 } // namespace chrome |
OLD | NEW |