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

Side by Side Diff: content/app/content_main_runner.cc

Issue 429053002: Use HighResNow whenever possible on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 (delegate_ && 650 (delegate_ &&
651 delegate_->ProcessRegistersWithSystemProcess(process_type))) { 651 delegate_->ProcessRegistersWithSystemProcess(process_type))) {
652 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); 652 base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
653 } 653 }
654 654
655 if (!process_type.empty() && 655 if (!process_type.empty() &&
656 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) { 656 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) {
657 MachBroker::ChildSendTaskPortToParent(); 657 MachBroker::ChildSendTaskPortToParent();
658 } 658 }
659 #elif defined(OS_WIN) 659 #elif defined(OS_WIN)
660 if (command_line.HasSwitch(switches::kEnableHighResolutionTime)) 660 base::TimeTicks::SetNowIsHighResNowIfSupported();
661 base::TimeTicks::SetNowIsHighResNowIfSupported();
662 661
663 bool init_device_scale_factor = true; 662 bool init_device_scale_factor = true;
664 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { 663 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) {
665 std::string scale_factor_string = command_line.GetSwitchValueASCII( 664 std::string scale_factor_string = command_line.GetSwitchValueASCII(
666 switches::kDeviceScaleFactor); 665 switches::kDeviceScaleFactor);
667 double scale_factor = 0; 666 double scale_factor = 0;
668 if (base::StringToDouble(scale_factor_string, &scale_factor)) { 667 if (base::StringToDouble(scale_factor_string, &scale_factor)) {
669 init_device_scale_factor = false; 668 init_device_scale_factor = false;
670 gfx::InitDeviceScaleFactor(scale_factor); 669 gfx::InitDeviceScaleFactor(scale_factor);
671 } 670 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 817
819 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 818 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
820 }; 819 };
821 820
822 // static 821 // static
823 ContentMainRunner* ContentMainRunner::Create() { 822 ContentMainRunner* ContentMainRunner::Create() {
824 return new ContentMainRunnerImpl(); 823 return new ContentMainRunnerImpl();
825 } 824 }
826 825
827 } // namespace content 826 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698