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(); | |
162 if (base::win::IsMetroProcess()) { | 161 if (base::win::IsMetroProcess()) { |
163 typedef const wchar_t* (*GetMetroSwitches)(void); | 162 typedef const wchar_t* (*GetMetroSwitches)(void); |
164 GetMetroSwitches metro_switches_proc = reinterpret_cast<GetMetroSwitches>( | 163 GetMetroSwitches metro_switches_proc = reinterpret_cast<GetMetroSwitches>( |
165 GetProcAddress(base::win::GetMetroModule(), | 164 GetProcAddress(base::win::GetMetroModule(), |
166 "GetMetroCommandLineSwitches")); | 165 "GetMetroCommandLineSwitches")); |
167 if (metro_switches_proc) { | 166 if (metro_switches_proc) { |
168 base::string16 metro_switches = (*metro_switches_proc)(); | 167 base::string16 metro_switches = (*metro_switches_proc)(); |
169 if (!metro_switches.empty()) { | 168 if (!metro_switches.empty()) { |
170 CommandLine extra_switches(CommandLine::NO_PROGRAM); | 169 CommandLine extra_switches(CommandLine::NO_PROGRAM); |
171 extra_switches.ParseFromString(metro_switches); | 170 extra_switches.ParseFromString(metro_switches); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 if (resource_id) | 428 if (resource_id) |
430 return l10n_util::GetStringUTF16(resource_id); | 429 return l10n_util::GetStringUTF16(resource_id); |
431 return base::string16(); | 430 return base::string16(); |
432 } | 431 } |
433 | 432 |
434 // static | 433 // static |
435 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 434 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
436 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 435 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
437 installer::SetTranslationDelegate(&delegate); | 436 installer::SetTranslationDelegate(&delegate); |
438 } | 437 } |
OLD | NEW |