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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 #include "ui/base/l10n/l10n_util.h" | 174 #include "ui/base/l10n/l10n_util.h" |
175 #include "ui/base/resource/resource_bundle.h" | 175 #include "ui/base/resource/resource_bundle.h" |
176 #include "ui/resources/grit/ui_resources.h" | 176 #include "ui/resources/grit/ui_resources.h" |
177 #include "url/gurl.h" | 177 #include "url/gurl.h" |
178 #include "url/origin.h" | 178 #include "url/origin.h" |
179 | 179 |
180 #if defined(OS_WIN) | 180 #if defined(OS_WIN) |
181 #include "base/strings/string_tokenizer.h" | 181 #include "base/strings/string_tokenizer.h" |
182 #include "base/win/windows_version.h" | 182 #include "base/win/windows_version.h" |
183 #include "chrome/browser/chrome_browser_main_win.h" | 183 #include "chrome/browser/chrome_browser_main_win.h" |
184 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.
h" | |
185 #include "sandbox/win/src/sandbox_policy.h" | 184 #include "sandbox/win/src/sandbox_policy.h" |
186 #elif defined(OS_MACOSX) | 185 #elif defined(OS_MACOSX) |
187 #include "chrome/browser/chrome_browser_main_mac.h" | 186 #include "chrome/browser/chrome_browser_main_mac.h" |
188 #elif defined(OS_CHROMEOS) | 187 #elif defined(OS_CHROMEOS) |
189 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" | 188 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" |
190 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 189 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
191 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" | 190 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" |
192 #include "chrome/browser/chromeos/file_manager/app_id.h" | 191 #include "chrome/browser/chromeos/file_manager/app_id.h" |
193 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" | 192 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" |
194 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" | 193 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
(...skipping 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2709 | 2708 |
2710 base::StringTokenizer tokenizer(mime_types, ","); | 2709 base::StringTokenizer tokenizer(mime_types, ","); |
2711 tokenizer.set_quote_chars("\""); | 2710 tokenizer.set_quote_chars("\""); |
2712 while (tokenizer.GetNext()) { | 2711 while (tokenizer.GetNext()) { |
2713 if (tokenizer.token() == mime_type) | 2712 if (tokenizer.token() == mime_type) |
2714 return true; | 2713 return true; |
2715 } | 2714 } |
2716 | 2715 |
2717 return false; | 2716 return false; |
2718 } | 2717 } |
2719 | |
2720 bool ChromeContentBrowserClient::ShouldUseWindowsPrefetchArgument() const { | |
2721 return startup_metric_utils::GetPreReadOptions().use_prefetch_argument; | |
2722 } | |
2723 #endif // defined(OS_WIN) | 2718 #endif // defined(OS_WIN) |
2724 | 2719 |
2725 void ChromeContentBrowserClient::RegisterRenderProcessMojoServices( | 2720 void ChromeContentBrowserClient::RegisterRenderProcessMojoServices( |
2726 content::ServiceRegistry* registry, | 2721 content::ServiceRegistry* registry, |
2727 content::RenderProcessHost* render_process_host) { | 2722 content::RenderProcessHost* render_process_host) { |
2728 registry->AddService( | 2723 registry->AddService( |
2729 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); | 2724 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); |
2730 } | 2725 } |
2731 | 2726 |
2732 void ChromeContentBrowserClient::RegisterFrameMojoShellServices( | 2727 void ChromeContentBrowserClient::RegisterFrameMojoShellServices( |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2964 if (channel <= kMaxDisableEncryptionChannel) { | 2959 if (channel <= kMaxDisableEncryptionChannel) { |
2965 static const char* const kWebRtcDevSwitchNames[] = { | 2960 static const char* const kWebRtcDevSwitchNames[] = { |
2966 switches::kDisableWebRtcEncryption, | 2961 switches::kDisableWebRtcEncryption, |
2967 }; | 2962 }; |
2968 to_command_line->CopySwitchesFrom(from_command_line, | 2963 to_command_line->CopySwitchesFrom(from_command_line, |
2969 kWebRtcDevSwitchNames, | 2964 kWebRtcDevSwitchNames, |
2970 arraysize(kWebRtcDevSwitchNames)); | 2965 arraysize(kWebRtcDevSwitchNames)); |
2971 } | 2966 } |
2972 } | 2967 } |
2973 #endif // defined(ENABLE_WEBRTC) | 2968 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |