OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
Mark Mentovai
2016/11/04 21:47:56
CL description: it allows for error reporting and
scottmg
2016/11/04 22:13:41
Done.
| |
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 |
11 #include <algorithm> | 11 #include <algorithm> |
(...skipping 185 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 | |
209 // Initialize the CommandLine singleton from the environment. | 207 // Initialize the CommandLine singleton from the environment. |
210 base::CommandLine::Init(0, nullptr); | 208 base::CommandLine::Init(0, nullptr); |
211 const base::CommandLine* command_line = | 209 const base::CommandLine* command_line = |
212 base::CommandLine::ForCurrentProcess(); | 210 base::CommandLine::ForCurrentProcess(); |
213 | 211 |
214 const std::string process_type = | 212 const std::string process_type = |
215 command_line->GetSwitchValueASCII(switches::kProcessType); | 213 command_line->GetSwitchValueASCII(switches::kProcessType); |
216 | 214 |
217 // Confirm that an explicit prefetch profile is used for all process types | 215 // Confirm that an explicit prefetch profile is used for all process types |
218 // except for the browser process. Any new process type will have to assign | 216 // except for the browser process. Any new process type will have to assign |
(...skipping 23 matching lines...) Expand all Loading... | |
242 RemoveAppCompatFlagsEntry(); | 240 RemoveAppCompatFlagsEntry(); |
243 | 241 |
244 // Load and launch the chrome dll. *Everything* happens inside. | 242 // Load and launch the chrome dll. *Everything* happens inside. |
245 VLOG(1) << "About to load main DLL."; | 243 VLOG(1) << "About to load main DLL."; |
246 MainDllLoader* loader = MakeMainDllLoader(); | 244 MainDllLoader* loader = MakeMainDllLoader(); |
247 int rc = loader->Launch(instance, exe_entry_point_ticks); | 245 int rc = loader->Launch(instance, exe_entry_point_ticks); |
248 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 246 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
249 delete loader; | 247 delete loader; |
250 return rc; | 248 return rc; |
251 } | 249 } |
OLD | NEW |