| 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 <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 #include "net/ssl/ssl_cert_request_info.h" | 160 #include "net/ssl/ssl_cert_request_info.h" |
| 161 #include "ppapi/host/ppapi_host.h" | 161 #include "ppapi/host/ppapi_host.h" |
| 162 #include "storage/browser/fileapi/external_mount_points.h" | 162 #include "storage/browser/fileapi/external_mount_points.h" |
| 163 #include "ui/base/l10n/l10n_util.h" | 163 #include "ui/base/l10n/l10n_util.h" |
| 164 #include "ui/base/resource/resource_bundle.h" | 164 #include "ui/base/resource/resource_bundle.h" |
| 165 #include "ui/resources/grit/ui_resources.h" | 165 #include "ui/resources/grit/ui_resources.h" |
| 166 | 166 |
| 167 #if defined(OS_WIN) | 167 #if defined(OS_WIN) |
| 168 #include "base/win/windows_version.h" | 168 #include "base/win/windows_version.h" |
| 169 #include "chrome/browser/chrome_browser_main_win.h" | 169 #include "chrome/browser/chrome_browser_main_win.h" |
| 170 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.
h" |
| 170 #include "sandbox/win/src/sandbox_policy.h" | 171 #include "sandbox/win/src/sandbox_policy.h" |
| 171 #elif defined(OS_MACOSX) | 172 #elif defined(OS_MACOSX) |
| 172 #include "chrome/browser/chrome_browser_main_mac.h" | 173 #include "chrome/browser/chrome_browser_main_mac.h" |
| 173 #elif defined(OS_CHROMEOS) | 174 #elif defined(OS_CHROMEOS) |
| 174 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" | 175 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" |
| 175 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 176 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 176 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" | 177 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" |
| 177 #include "chrome/browser/chromeos/file_manager/app_id.h" | 178 #include "chrome/browser/chromeos/file_manager/app_id.h" |
| 178 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" | 179 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" |
| 179 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" | 180 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
| (...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2629 if (result != sandbox::SBOX_ALL_OK) | 2630 if (result != sandbox::SBOX_ALL_OK) |
| 2630 return false; | 2631 return false; |
| 2631 | 2632 |
| 2632 // Renderers need to send named pipe handles and shared memory | 2633 // Renderers need to send named pipe handles and shared memory |
| 2633 // segment handles to NaCl loader processes. | 2634 // segment handles to NaCl loader processes. |
| 2634 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES, | 2635 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES, |
| 2635 sandbox::TargetPolicy::HANDLES_DUP_ANY, | 2636 sandbox::TargetPolicy::HANDLES_DUP_ANY, |
| 2636 L"File"); | 2637 L"File"); |
| 2637 return result == sandbox::SBOX_ALL_OK; | 2638 return result == sandbox::SBOX_ALL_OK; |
| 2638 } | 2639 } |
| 2640 |
| 2641 bool ChromeContentBrowserClient::ShouldUseWindowsPrefetchArgument() const { |
| 2642 return startup_metric_utils::GetPreReadOptions().prefetch_argument; |
| 2643 } |
| 2639 #endif | 2644 #endif |
| 2640 | 2645 |
| 2641 void ChromeContentBrowserClient::RegisterFrameMojoShellServices( | 2646 void ChromeContentBrowserClient::RegisterFrameMojoShellServices( |
| 2642 content::ServiceRegistry* registry, | 2647 content::ServiceRegistry* registry, |
| 2643 content::RenderFrameHost* render_frame_host) { | 2648 content::RenderFrameHost* render_frame_host) { |
| 2644 #if defined(OS_CHROMEOS) | 2649 #if defined(OS_CHROMEOS) |
| 2645 registry->AddService( | 2650 registry->AddService( |
| 2646 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, | 2651 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, |
| 2647 render_frame_host)); | 2652 render_frame_host)); |
| 2648 #endif | 2653 #endif |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2824 if (channel <= kMaxDisableEncryptionChannel) { | 2829 if (channel <= kMaxDisableEncryptionChannel) { |
| 2825 static const char* const kWebRtcDevSwitchNames[] = { | 2830 static const char* const kWebRtcDevSwitchNames[] = { |
| 2826 switches::kDisableWebRtcEncryption, | 2831 switches::kDisableWebRtcEncryption, |
| 2827 }; | 2832 }; |
| 2828 to_command_line->CopySwitchesFrom(from_command_line, | 2833 to_command_line->CopySwitchesFrom(from_command_line, |
| 2829 kWebRtcDevSwitchNames, | 2834 kWebRtcDevSwitchNames, |
| 2830 arraysize(kWebRtcDevSwitchNames)); | 2835 arraysize(kWebRtcDevSwitchNames)); |
| 2831 } | 2836 } |
| 2832 } | 2837 } |
| 2833 #endif // defined(ENABLE_WEBRTC) | 2838 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |