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" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { | 121 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { |
122 startup_metric_utils::RecordExeMainEntryTime(); | 122 startup_metric_utils::RecordExeMainEntryTime(); |
123 // Initialize the commandline singleton from the environment. | 123 // Initialize the commandline singleton from the environment. |
124 CommandLine::Init(0, NULL); | 124 CommandLine::Init(0, NULL); |
125 // The exit manager is in charge of calling the dtors of singletons. | 125 // The exit manager is in charge of calling the dtors of singletons. |
126 base::AtExitManager exit_manager; | 126 base::AtExitManager exit_manager; |
127 | 127 |
128 if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) | 128 if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) |
129 return 0; | 129 return 0; |
130 | 130 |
131 // The purpose of this call is to force the addition of an entry in the IAT | 131 // Signal Chrome Elf that Chrome has begun to start. |
132 // for chrome_elf.dll to force a load time dependency. | 132 SignalChromeElf(); |
133 InitChromeElf(); | |
134 | 133 |
135 MetroDriver metro_driver; | 134 MetroDriver metro_driver; |
136 if (metro_driver.in_metro_mode()) | 135 if (metro_driver.in_metro_mode()) |
137 return metro_driver.RunInMetro(instance, &RunChrome); | 136 return metro_driver.RunInMetro(instance, &RunChrome); |
138 // Not in metro mode, proceed as normal. | 137 // Not in metro mode, proceed as normal. |
139 return RunChrome(instance); | 138 return RunChrome(instance); |
140 } | 139 } |
OLD | NEW |