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

Side by Side Diff: content/app/content_main_runner.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 | « chrome/browser/chrome_browser_main_win.cc ('k') | no next file » | 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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/allocator/allocator_extension.h" 9 #include "base/allocator/allocator_extension.h"
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 (delegate_ && 659 (delegate_ &&
660 delegate_->ProcessRegistersWithSystemProcess(process_type))) { 660 delegate_->ProcessRegistersWithSystemProcess(process_type))) {
661 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); 661 base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
662 } 662 }
663 663
664 if (!process_type.empty() && 664 if (!process_type.empty() &&
665 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) { 665 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) {
666 MachBroker::ChildSendTaskPortToParent(); 666 MachBroker::ChildSendTaskPortToParent();
667 } 667 }
668 #elif defined(OS_WIN) 668 #elif defined(OS_WIN)
669 base::TimeTicks::SetNowIsHighResNowIfSupported();
670
671 bool init_device_scale_factor = true; 669 bool init_device_scale_factor = true;
672 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { 670 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) {
673 std::string scale_factor_string = command_line.GetSwitchValueASCII( 671 std::string scale_factor_string = command_line.GetSwitchValueASCII(
674 switches::kDeviceScaleFactor); 672 switches::kDeviceScaleFactor);
675 double scale_factor = 0; 673 double scale_factor = 0;
676 if (base::StringToDouble(scale_factor_string, &scale_factor)) { 674 if (base::StringToDouble(scale_factor_string, &scale_factor)) {
677 init_device_scale_factor = false; 675 init_device_scale_factor = false;
678 gfx::InitDeviceScaleFactor(scale_factor); 676 gfx::InitDeviceScaleFactor(scale_factor);
679 } 677 }
680 } 678 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 826
829 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 827 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
830 }; 828 };
831 829
832 // static 830 // static
833 ContentMainRunner* ContentMainRunner::Create() { 831 ContentMainRunner* ContentMainRunner::Create() {
834 return new ContentMainRunnerImpl(); 832 return new ContentMainRunnerImpl();
835 } 833 }
836 834
837 } // namespace content 835 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698