summaryrefslogtreecommitdiffstats
path: root/chrome/common/histogram_synchronizer.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-02 05:59:37 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-02 05:59:37 +0000
commit6fad26338ed6119903826156f307e20fe6657c31 (patch)
tree5c6baed35fce907a0cea47ed6091c941db8ebfd1 /chrome/common/histogram_synchronizer.cc
parentf75c8f13b967b01babc9454506e9d2ed00519e39 (diff)
downloadchromium_src-6fad26338ed6119903826156f307e20fe6657c31.zip
chromium_src-6fad26338ed6119903826156f307e20fe6657c31.tar.gz
chromium_src-6fad26338ed6119903826156f307e20fe6657c31.tar.bz2
Third patch in getting rid of caching MessageLoop pointers and always using ChromeThread instead.
BUG=25354 Review URL: http://codereview.chromium.org/342068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/histogram_synchronizer.cc')
-rw-r--r--chrome/common/histogram_synchronizer.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/common/histogram_synchronizer.cc b/chrome/common/histogram_synchronizer.cc
index cc20c41..2a7e09a 100644
--- a/chrome/common/histogram_synchronizer.cc
+++ b/chrome/common/histogram_synchronizer.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,7 +7,7 @@
#include "base/histogram.h"
#include "base/logging.h"
#include "base/thread.h"
-#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/common/render_messages.h"
@@ -97,8 +97,10 @@ void HistogramSynchronizer::FetchRendererHistogramsAsynchronously(
}
// callback_task_ member can only be accessed on IO thread.
- g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(current_synchronizer,
+ ChromeThread::PostTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ current_synchronizer,
&HistogramSynchronizer::SetCallbackTaskToCallAfterGettingHistograms,
callback_thread,
callback_task));
@@ -114,8 +116,10 @@ void HistogramSynchronizer::FetchRendererHistogramsAsynchronously(
}
// Post a task that would be called after waiting for wait_time.
- g_browser_process->io_thread()->message_loop()->PostDelayedTask(FROM_HERE,
- NewRunnableMethod(current_synchronizer,
+ ChromeThread::PostDelayedTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ current_synchronizer,
&HistogramSynchronizer::ForceHistogramSynchronizationDoneCallback,
sequence_number),
wait_time);