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

Unified Diff: chrome/common/histogram_synchronizer.cc

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/worker_host/worker_service.cc ('k') | chrome/common/important_file_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/histogram_synchronizer.cc
===================================================================
--- chrome/common/histogram_synchronizer.cc (revision 30650)
+++ chrome/common/histogram_synchronizer.cc (working copy)
@@ -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 @@
}
// 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 @@
}
// 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);
« no previous file with comments | « chrome/browser/worker_host/worker_service.cc ('k') | chrome/common/important_file_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698