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

Side by Side Diff: chrome/common/histogram_synchronizer.cc

Issue 155944: Switch the first thread in a child process to be the main thread... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 11 years, 5 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 | Annotate | Revision Log
Property Changes:
Deleted: svn:eol-style
- LF
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 5 #include <string>
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/thread.h"
10 #include "chrome/browser/browser.h" 11 #include "chrome/browser/browser.h"
11 #include "chrome/browser/browser_list.h" 12 #include "chrome/browser/browser_list.h"
12 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/renderer_host/render_process_host.h" 14 #include "chrome/browser/renderer_host/render_process_host.h"
14 #include "chrome/common/child_thread.h" 15 #include "chrome/common/child_thread.h"
15 #include "chrome/common/render_messages.h" 16 #include "chrome/common/render_messages.h"
16 #include "chrome/common/histogram_synchronizer.h" 17 #include "chrome/common/histogram_synchronizer.h"
17 18
18 using base::Time; 19 using base::Time;
19 using base::TimeDelta; 20 using base::TimeDelta;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 252
252 bool HistogramSynchronizer::IsOnIoThread() { 253 bool HistogramSynchronizer::IsOnIoThread() {
253 if (io_message_loop_ == NULL) { 254 if (io_message_loop_ == NULL) {
254 io_message_loop_ = MessageLoop::current(); 255 io_message_loop_ = MessageLoop::current();
255 } 256 }
256 return (MessageLoop::current() == io_message_loop_); 257 return (MessageLoop::current() == io_message_loop_);
257 } 258 }
258 259
259 // static 260 // static
260 HistogramSynchronizer* HistogramSynchronizer::histogram_synchronizer_ = NULL; 261 HistogramSynchronizer* HistogramSynchronizer::histogram_synchronizer_ = NULL;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698