| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace | 199 } // namespace |
| 200 | 200 |
| 201 #if !defined(WIN_CONSOLE_APP) | 201 #if !defined(WIN_CONSOLE_APP) |
| 202 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { | 202 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { |
| 203 #else | 203 #else |
| 204 int main() { | 204 int main() { |
| 205 HINSTANCE instance = GetModuleHandle(nullptr); | 205 HINSTANCE instance = GetModuleHandle(nullptr); |
| 206 #endif | 206 #endif |
| 207 SignalInitializeCrashReporting(); |
| 208 |
| 207 // Initialize the CommandLine singleton from the environment. | 209 // Initialize the CommandLine singleton from the environment. |
| 208 base::CommandLine::Init(0, nullptr); | 210 base::CommandLine::Init(0, nullptr); |
| 209 const base::CommandLine* command_line = | 211 const base::CommandLine* command_line = |
| 210 base::CommandLine::ForCurrentProcess(); | 212 base::CommandLine::ForCurrentProcess(); |
| 211 | 213 |
| 212 const std::string process_type = | 214 const std::string process_type = |
| 213 command_line->GetSwitchValueASCII(switches::kProcessType); | 215 command_line->GetSwitchValueASCII(switches::kProcessType); |
| 214 | 216 |
| 215 // Confirm that an explicit prefetch profile is used for all process types | 217 // Confirm that an explicit prefetch profile is used for all process types |
| 216 // except for the browser process. Any new process type will have to assign | 218 // except for the browser process. Any new process type will have to assign |
| (...skipping 23 matching lines...) Expand all Loading... |
| 240 RemoveAppCompatFlagsEntry(); | 242 RemoveAppCompatFlagsEntry(); |
| 241 | 243 |
| 242 // Load and launch the chrome dll. *Everything* happens inside. | 244 // Load and launch the chrome dll. *Everything* happens inside. |
| 243 VLOG(1) << "About to load main DLL."; | 245 VLOG(1) << "About to load main DLL."; |
| 244 MainDllLoader* loader = MakeMainDllLoader(); | 246 MainDllLoader* loader = MakeMainDllLoader(); |
| 245 int rc = loader->Launch(instance, exe_entry_point_ticks); | 247 int rc = loader->Launch(instance, exe_entry_point_ticks); |
| 246 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 248 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
| 247 delete loader; | 249 delete loader; |
| 248 return rc; | 250 return rc; |
| 249 } | 251 } |
| OLD | NEW |