| OLD | NEW |
| 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 Loading... |
| 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; |
| OLD | NEW |