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 } // 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 install_static::InstallDetails::InitializeFromPrimaryModule( | 207 install_static::InstallDetails::InitializeFromPrimaryModule( |
208 chrome::kChromeElfDllName); | 208 chrome::kChromeElfDllName); |
209 SignalInitializeCrashReporting(); | |
210 | 209 |
211 // Initialize the CommandLine singleton from the environment. | 210 // Initialize the CommandLine singleton from the environment. |
212 base::CommandLine::Init(0, nullptr); | 211 base::CommandLine::Init(0, nullptr); |
213 const base::CommandLine* command_line = | 212 const base::CommandLine* command_line = |
214 base::CommandLine::ForCurrentProcess(); | 213 base::CommandLine::ForCurrentProcess(); |
215 | 214 |
216 const std::string process_type = | 215 const std::string process_type = |
217 command_line->GetSwitchValueASCII(switches::kProcessType); | 216 command_line->GetSwitchValueASCII(switches::kProcessType); |
218 | 217 |
219 // Confirm that an explicit prefetch profile is used for all process types | 218 // Confirm that an explicit prefetch profile is used for all process types |
(...skipping 24 matching lines...) Expand all Loading... |
244 RemoveAppCompatFlagsEntry(); | 243 RemoveAppCompatFlagsEntry(); |
245 | 244 |
246 // Load and launch the chrome dll. *Everything* happens inside. | 245 // Load and launch the chrome dll. *Everything* happens inside. |
247 VLOG(1) << "About to load main DLL."; | 246 VLOG(1) << "About to load main DLL."; |
248 MainDllLoader* loader = MakeMainDllLoader(); | 247 MainDllLoader* loader = MakeMainDllLoader(); |
249 int rc = loader->Launch(instance, exe_entry_point_ticks); | 248 int rc = loader->Launch(instance, exe_entry_point_ticks); |
250 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 249 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
251 delete loader; | 250 delete loader; |
252 return rc; | 251 return rc; |
253 } | 252 } |
OLD | NEW |