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

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

Issue 41953002: Use HighResNow whenever possible on Windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 2 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 (delegate && 675 (delegate &&
676 delegate->ProcessRegistersWithSystemProcess(process_type))) { 676 delegate->ProcessRegistersWithSystemProcess(process_type))) {
677 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); 677 base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
678 } 678 }
679 679
680 if (!process_type.empty() && 680 if (!process_type.empty() &&
681 (!delegate || delegate->ShouldSendMachPort(process_type))) { 681 (!delegate || delegate->ShouldSendMachPort(process_type))) {
682 MachBroker::ChildSendTaskPortToParent(); 682 MachBroker::ChildSendTaskPortToParent();
683 } 683 }
684 #elif defined(OS_WIN) 684 #elif defined(OS_WIN)
685 if (command_line.HasSwitch(switches::kEnableHighResolutionTime)) 685 base::TimeTicks::SetNowIsHighResNowIfSupported();
686 base::TimeTicks::SetNowIsHighResNowIfSupported();
687 686
688 // This must be done early enough since some helper functions like 687 // This must be done early enough since some helper functions like
689 // IsTouchEnabled, needed to load resources, may call into the theme dll. 688 // IsTouchEnabled, needed to load resources, may call into the theme dll.
690 EnableThemeSupportOnAllWindowStations(); 689 EnableThemeSupportOnAllWindowStations();
691 SetupCRT(command_line); 690 SetupCRT(command_line);
692 #endif 691 #endif
693 692
694 #if defined(OS_POSIX) 693 #if defined(OS_POSIX)
695 if (!process_type.empty()) { 694 if (!process_type.empty()) {
696 // When you hit Ctrl-C in a terminal running the browser 695 // When you hit Ctrl-C in a terminal running the browser
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 834
836 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 835 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
837 }; 836 };
838 837
839 // static 838 // static
840 ContentMainRunner* ContentMainRunner::Create() { 839 ContentMainRunner* ContentMainRunner::Create() {
841 return new ContentMainRunnerImpl(); 840 return new ContentMainRunnerImpl();
842 } 841 }
843 842
844 } // namespace content 843 } // 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