OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chrome_browser_main_win.h" | 5 #include "chrome/browser/chrome_browser_main_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 } | 151 } |
152 } | 152 } |
153 return result; | 153 return result; |
154 } | 154 } |
155 | 155 |
156 // ChromeBrowserMainPartsWin --------------------------------------------------- | 156 // ChromeBrowserMainPartsWin --------------------------------------------------- |
157 | 157 |
158 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( | 158 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( |
159 const content::MainFunctionParams& parameters) | 159 const content::MainFunctionParams& parameters) |
160 : ChromeBrowserMainParts(parameters) { | 160 : ChromeBrowserMainParts(parameters) { |
| 161 base::TimeTicks::SetNowIsHighResNowIfSupported(); |
161 if (base::win::IsMetroProcess()) { | 162 if (base::win::IsMetroProcess()) { |
162 typedef const wchar_t* (*GetMetroSwitches)(void); | 163 typedef const wchar_t* (*GetMetroSwitches)(void); |
163 GetMetroSwitches metro_switches_proc = reinterpret_cast<GetMetroSwitches>( | 164 GetMetroSwitches metro_switches_proc = reinterpret_cast<GetMetroSwitches>( |
164 GetProcAddress(base::win::GetMetroModule(), | 165 GetProcAddress(base::win::GetMetroModule(), |
165 "GetMetroCommandLineSwitches")); | 166 "GetMetroCommandLineSwitches")); |
166 if (metro_switches_proc) { | 167 if (metro_switches_proc) { |
167 base::string16 metro_switches = (*metro_switches_proc)(); | 168 base::string16 metro_switches = (*metro_switches_proc)(); |
168 if (!metro_switches.empty()) { | 169 if (!metro_switches.empty()) { |
169 CommandLine extra_switches(CommandLine::NO_PROGRAM); | 170 CommandLine extra_switches(CommandLine::NO_PROGRAM); |
170 extra_switches.ParseFromString(metro_switches); | 171 extra_switches.ParseFromString(metro_switches); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 if (resource_id) | 429 if (resource_id) |
429 return l10n_util::GetStringUTF16(resource_id); | 430 return l10n_util::GetStringUTF16(resource_id); |
430 return base::string16(); | 431 return base::string16(); |
431 } | 432 } |
432 | 433 |
433 // static | 434 // static |
434 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 435 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
435 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 436 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
436 installer::SetTranslationDelegate(&delegate); | 437 installer::SetTranslationDelegate(&delegate); |
437 } | 438 } |
OLD | NEW |