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 <tchar.h> | 6 #include <tchar.h> |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "chrome/app/chrome_breakpad_client.h" | 14 #include "chrome/app/chrome_breakpad_client.h" |
15 #include "chrome/app/client_util.h" | 15 #include "chrome/app/client_util.h" |
16 #include "chrome/app/metro_driver_win.h" | 16 #include "chrome/app/metro_driver_win.h" |
17 #include "chrome/browser/chrome_process_finder_win.h" | 17 #include "chrome/browser/chrome_process_finder_win.h" |
18 #include "chrome/browser/policy/policy_path_parser.h" | 18 #include "chrome/browser/policy/policy_path_parser.h" |
19 #include "chrome/common/chrome_paths_internal.h" | 19 #include "chrome/common/chrome_paths_internal.h" |
20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
| 21 #include "chrome_elf/chrome_elf_main.h" |
21 #include "components/breakpad/app/breakpad_client.h" | 22 #include "components/breakpad/app/breakpad_client.h" |
22 #include "components/breakpad/app/breakpad_win.h" | 23 #include "components/breakpad/app/breakpad_win.h" |
23 #include "content/public/app/startup_helper_win.h" | 24 #include "content/public/app/startup_helper_win.h" |
24 #include "content/public/common/result_codes.h" | 25 #include "content/public/common/result_codes.h" |
25 #include "sandbox/win/src/sandbox_factory.h" | 26 #include "sandbox/win/src/sandbox_factory.h" |
26 | 27 |
27 namespace { | 28 namespace { |
28 | 29 |
29 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky | 30 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky |
30 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER; | 31 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 99 } |
99 | 100 |
100 } // namespace | 101 } // namespace |
101 | 102 |
102 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { | 103 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { |
103 // Initialize the commandline singleton from the environment. | 104 // Initialize the commandline singleton from the environment. |
104 CommandLine::Init(0, NULL); | 105 CommandLine::Init(0, NULL); |
105 // The exit manager is in charge of calling the dtors of singletons. | 106 // The exit manager is in charge of calling the dtors of singletons. |
106 base::AtExitManager exit_manager; | 107 base::AtExitManager exit_manager; |
107 | 108 |
| 109 InitChromeElf(); |
| 110 |
108 if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) | 111 if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) |
109 return 0; | 112 return 0; |
110 | 113 |
111 MetroDriver metro_driver; | 114 MetroDriver metro_driver; |
112 if (metro_driver.in_metro_mode()) | 115 if (metro_driver.in_metro_mode()) |
113 return metro_driver.RunInMetro(instance, &RunChrome); | 116 return metro_driver.RunInMetro(instance, &RunChrome); |
114 // Not in metro mode, proceed as normal. | 117 // Not in metro mode, proceed as normal. |
115 return RunChrome(instance); | 118 return RunChrome(instance); |
116 } | 119 } |
OLD | NEW |