Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1595633002: Use valid /prefetch arguments for process launches on Windows. - do not submit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move
Patch Set: format Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 "chrome/common/prefetch_argument_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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 #endif 1406 #endif
1406 1407
1407 if (logging::DialogsAreSuppressed()) 1408 if (logging::DialogsAreSuppressed())
1408 command_line->AppendSwitch(switches::kNoErrorDialogs); 1409 command_line->AppendSwitch(switches::kNoErrorDialogs);
1409 1410
1410 std::string process_type = 1411 std::string process_type =
1411 command_line->GetSwitchValueASCII(switches::kProcessType); 1412 command_line->GetSwitchValueASCII(switches::kProcessType);
1412 const base::CommandLine& browser_command_line = 1413 const base::CommandLine& browser_command_line =
1413 *base::CommandLine::ForCurrentProcess(); 1414 *base::CommandLine::ForCurrentProcess();
1414 1415
1416 #if defined(OS_WIN)
1417 chrome::AddWindowsPrefetchArgument(command_line);
1418 #endif // defined(OS_WIN)
1419
1415 static const char* const kCommonSwitchNames[] = { 1420 static const char* const kCommonSwitchNames[] = {
1416 switches::kUserAgent, 1421 switches::kUserAgent,
1417 switches::kUserDataDir, // Make logs go to the right file. 1422 switches::kUserDataDir, // Make logs go to the right file.
1418 }; 1423 };
1419 command_line->CopySwitchesFrom(browser_command_line, kCommonSwitchNames, 1424 command_line->CopySwitchesFrom(browser_command_line, kCommonSwitchNames,
1420 arraysize(kCommonSwitchNames)); 1425 arraysize(kCommonSwitchNames));
1421 1426
1422 #if defined(ENABLE_IPC_FUZZER) 1427 #if defined(ENABLE_IPC_FUZZER)
1423 static const char* const kIpcFuzzerSwitches[] = { 1428 static const char* const kIpcFuzzerSwitches[] = {
1424 switches::kIpcDumpDirectory, 1429 switches::kIpcDumpDirectory,
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2818 if (channel <= kMaxDisableEncryptionChannel) { 2823 if (channel <= kMaxDisableEncryptionChannel) {
2819 static const char* const kWebRtcDevSwitchNames[] = { 2824 static const char* const kWebRtcDevSwitchNames[] = {
2820 switches::kDisableWebRtcEncryption, 2825 switches::kDisableWebRtcEncryption,
2821 }; 2826 };
2822 to_command_line->CopySwitchesFrom(from_command_line, 2827 to_command_line->CopySwitchesFrom(from_command_line,
2823 kWebRtcDevSwitchNames, 2828 kWebRtcDevSwitchNames,
2824 arraysize(kWebRtcDevSwitchNames)); 2829 arraysize(kWebRtcDevSwitchNames));
2825 } 2830 }
2826 } 2831 }
2827 #endif // defined(ENABLE_WEBRTC) 2832 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698