Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: chrome/browser/chrome_browser_main_win.cc

Issue 446203002: Initialize the now_funciton to the HighResNowWrapper in case High Res is supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the now_function static Initializer Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/time/time_win.cc ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « base/time/time_win.cc ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698