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

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

Issue 516693002: Revert of 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: 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 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
664 bool init_device_scale_factor = true; 666 bool init_device_scale_factor = true;
665 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { 667 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) {
666 std::string scale_factor_string = command_line.GetSwitchValueASCII( 668 std::string scale_factor_string = command_line.GetSwitchValueASCII(
667 switches::kDeviceScaleFactor); 669 switches::kDeviceScaleFactor);
668 double scale_factor = 0; 670 double scale_factor = 0;
669 if (base::StringToDouble(scale_factor_string, &scale_factor)) { 671 if (base::StringToDouble(scale_factor_string, &scale_factor)) {
670 init_device_scale_factor = false; 672 init_device_scale_factor = false;
671 gfx::InitDeviceScaleFactor(scale_factor); 673 gfx::InitDeviceScaleFactor(scale_factor);
672 } 674 }
673 } 675 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 823
822 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 824 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
823 }; 825 };
824 826
825 // static 827 // static
826 ContentMainRunner* ContentMainRunner::Create() { 828 ContentMainRunner* ContentMainRunner::Create() {
827 return new ContentMainRunnerImpl(); 829 return new ContentMainRunnerImpl();
828 } 830 }
829 831
830 } // namespace content 832 } // 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