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

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: Enable HiRes by default instead of using LowRes then switching to it. Created 6 years, 4 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
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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 (delegate_ && 654 (delegate_ &&
655 delegate_->ProcessRegistersWithSystemProcess(process_type))) { 655 delegate_->ProcessRegistersWithSystemProcess(process_type))) {
656 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); 656 base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
657 } 657 }
658 658
659 if (!process_type.empty() && 659 if (!process_type.empty() &&
660 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) { 660 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) {
661 MachBroker::ChildSendTaskPortToParent(); 661 MachBroker::ChildSendTaskPortToParent();
662 } 662 }
663 #elif defined(OS_WIN) 663 #elif defined(OS_WIN)
664 base::TimeTicks::SetNowIsHighResNowIfSupported();
665
666 bool init_device_scale_factor = true; 664 bool init_device_scale_factor = true;
667 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { 665 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) {
668 std::string scale_factor_string = command_line.GetSwitchValueASCII( 666 std::string scale_factor_string = command_line.GetSwitchValueASCII(
669 switches::kDeviceScaleFactor); 667 switches::kDeviceScaleFactor);
670 double scale_factor = 0; 668 double scale_factor = 0;
671 if (base::StringToDouble(scale_factor_string, &scale_factor)) { 669 if (base::StringToDouble(scale_factor_string, &scale_factor)) {
672 init_device_scale_factor = false; 670 init_device_scale_factor = false;
673 gfx::InitDeviceScaleFactor(scale_factor); 671 gfx::InitDeviceScaleFactor(scale_factor);
674 } 672 }
675 } 673 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 821
824 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 822 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
825 }; 823 };
826 824
827 // static 825 // static
828 ContentMainRunner* ContentMainRunner::Create() { 826 ContentMainRunner* ContentMainRunner::Create() {
829 return new ContentMainRunnerImpl(); 827 return new ContentMainRunnerImpl();
830 } 828 }
831 829
832 } // namespace content 830 } // namespace content
OLDNEW
« base/time/time_win.cc ('K') | « 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