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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } | 199 } |
200 | 200 |
201 } // namespace | 201 } // namespace |
202 | 202 |
203 #if !defined(WIN_CONSOLE_APP) | 203 #if !defined(WIN_CONSOLE_APP) |
204 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { | 204 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { |
205 #else | 205 #else |
206 int main() { | 206 int main() { |
207 HINSTANCE instance = GetModuleHandle(nullptr); | 207 HINSTANCE instance = GetModuleHandle(nullptr); |
208 #endif | 208 #endif |
| 209 SignalInitializeCrashReporting(); |
| 210 |
209 // Initialize the CommandLine singleton from the environment. | 211 // Initialize the CommandLine singleton from the environment. |
210 base::CommandLine::Init(0, nullptr); | 212 base::CommandLine::Init(0, nullptr); |
211 const base::CommandLine* command_line = | 213 const base::CommandLine* command_line = |
212 base::CommandLine::ForCurrentProcess(); | 214 base::CommandLine::ForCurrentProcess(); |
213 | 215 |
214 const std::string process_type = | 216 const std::string process_type = |
215 command_line->GetSwitchValueASCII(switches::kProcessType); | 217 command_line->GetSwitchValueASCII(switches::kProcessType); |
216 | 218 |
217 startup_metric_utils::InitializePreReadOptions( | 219 startup_metric_utils::InitializePreReadOptions( |
218 BrowserDistribution::GetDistribution()->GetRegistryPath()); | 220 BrowserDistribution::GetDistribution()->GetRegistryPath()); |
(...skipping 26 matching lines...) Expand all Loading... |
245 RemoveAppCompatFlagsEntry(); | 247 RemoveAppCompatFlagsEntry(); |
246 | 248 |
247 // Load and launch the chrome dll. *Everything* happens inside. | 249 // Load and launch the chrome dll. *Everything* happens inside. |
248 VLOG(1) << "About to load main DLL."; | 250 VLOG(1) << "About to load main DLL."; |
249 MainDllLoader* loader = MakeMainDllLoader(); | 251 MainDllLoader* loader = MakeMainDllLoader(); |
250 int rc = loader->Launch(instance); | 252 int rc = loader->Launch(instance); |
251 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 253 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
252 delete loader; | 254 delete loader; |
253 return rc; | 255 return rc; |
254 } | 256 } |
OLD | NEW |