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

Side by Side Diff: chrome/browser/chromeos/boot_times_loader.cc

Issue 8769013: Remove BrowserThread::UnsafeGetBrowserThread, add UnsafeGetMessageLoopForThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to lkgr (pure merge). Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/chromeos/version_loader.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/boot_times_loader.h" 5 #include "chrome/browser/chromeos/boot_times_loader.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 BootTimesLoader::~BootTimesLoader() {} 114 BootTimesLoader::~BootTimesLoader() {}
115 115
116 // static 116 // static
117 BootTimesLoader* BootTimesLoader::Get() { 117 BootTimesLoader* BootTimesLoader::Get() {
118 return g_boot_times_loader.Pointer(); 118 return g_boot_times_loader.Pointer();
119 } 119 }
120 120
121 BootTimesLoader::Handle BootTimesLoader::GetBootTimes( 121 BootTimesLoader::Handle BootTimesLoader::GetBootTimes(
122 CancelableRequestConsumerBase* consumer, 122 CancelableRequestConsumerBase* consumer,
123 BootTimesLoader::GetBootTimesCallback* callback) { 123 BootTimesLoader::GetBootTimesCallback* callback) {
124 if (!g_browser_process->file_thread()) { 124 if (!BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) {
125 // This should only happen if Chrome is shutting down, so we don't do 125 // This should only happen if Chrome is shutting down, so we don't do
126 // anything. 126 // anything.
127 return 0; 127 return 0;
128 } 128 }
129 129
130 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 130 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
131 if (command_line.HasSwitch(switches::kTestType)) { 131 if (command_line.HasSwitch(switches::kTestType)) {
132 // TODO(davemoore) This avoids boottimes for tests. This needs to be 132 // TODO(davemoore) This avoids boottimes for tests. This needs to be
133 // replaced with a mock of BootTimesLoader. 133 // replaced with a mock of BootTimesLoader.
134 return 0; 134 return 0;
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 GetRenderWidgetHost(&tab_contents->controller()); 478 GetRenderWidgetHost(&tab_contents->controller());
479 render_widget_hosts_loading_.erase(render_widget_host); 479 render_widget_hosts_loading_.erase(render_widget_host);
480 break; 480 break;
481 } 481 }
482 default: 482 default:
483 break; 483 break;
484 } 484 }
485 } 485 }
486 486
487 } // namespace chromeos 487 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/chromeos/version_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698