OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 5 #include <windows.h> |
6 #include <malloc.h> | 6 #include <malloc.h> |
7 #include <shellscalingapi.h> | 7 #include <shellscalingapi.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <tchar.h> | 9 #include <tchar.h> |
10 | 10 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 const std::string process_type = | 222 const std::string process_type = |
223 command_line->GetSwitchValueASCII(switches::kProcessType); | 223 command_line->GetSwitchValueASCII(switches::kProcessType); |
224 | 224 |
225 startup_metric_utils::InitializePreReadOptions( | 225 startup_metric_utils::InitializePreReadOptions( |
226 BrowserDistribution::GetDistribution()->GetRegistryPath()); | 226 BrowserDistribution::GetDistribution()->GetRegistryPath()); |
227 | 227 |
228 // Confirm that an explicit prefetch profile is used for all process types | 228 // Confirm that an explicit prefetch profile is used for all process types |
229 // except for the browser process. Any new process type will have to assign | 229 // except for the browser process. Any new process type will have to assign |
230 // itself a prefetch id. See kPrefetchArgument* constants in | 230 // itself a prefetch id. See kPrefetchArgument* constants in |
231 // content_switches.cc for details. | 231 // content_switches.cc for details. |
232 DCHECK(!startup_metric_utils::GetPreReadOptions().use_prefetch_argument || | 232 DCHECK(process_type.empty() || |
233 process_type.empty() || | |
234 HasValidWindowsPrefetchArgument(*command_line)); | 233 HasValidWindowsPrefetchArgument(*command_line)); |
235 | 234 |
236 if (process_type == crash_reporter::switches::kCrashpadHandler) { | 235 if (process_type == crash_reporter::switches::kCrashpadHandler) { |
237 return crash_reporter::RunAsCrashpadHandler( | 236 return crash_reporter::RunAsCrashpadHandler( |
238 *base::CommandLine::ForCurrentProcess()); | 237 *base::CommandLine::ForCurrentProcess()); |
239 } | 238 } |
240 | 239 |
241 crash_reporter::SetCrashReporterClient(g_chrome_crash_client.Pointer()); | 240 crash_reporter::SetCrashReporterClient(g_chrome_crash_client.Pointer()); |
242 crash_reporter::InitializeCrashpadWithEmbeddedHandler(process_type.empty(), | 241 crash_reporter::InitializeCrashpadWithEmbeddedHandler(process_type.empty(), |
243 process_type); | 242 process_type); |
(...skipping 14 matching lines...) Expand all Loading... |
258 RemoveAppCompatFlagsEntry(); | 257 RemoveAppCompatFlagsEntry(); |
259 | 258 |
260 // Load and launch the chrome dll. *Everything* happens inside. | 259 // Load and launch the chrome dll. *Everything* happens inside. |
261 VLOG(1) << "About to load main DLL."; | 260 VLOG(1) << "About to load main DLL."; |
262 MainDllLoader* loader = MakeMainDllLoader(); | 261 MainDllLoader* loader = MakeMainDllLoader(); |
263 int rc = loader->Launch(instance); | 262 int rc = loader->Launch(instance); |
264 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 263 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
265 delete loader; | 264 delete loader; |
266 return rc; | 265 return rc; |
267 } | 266 } |
OLD | NEW |