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

Unified Diff: chrome/browser/browsing_data_remover.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/browser_shutdown.cc ('k') | chrome/browser/chrome_plugin_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_remover.cc
===================================================================
--- chrome/browser/browsing_data_remover.cc (revision 30650)
+++ chrome/browser/browsing_data_remover.cc (working copy)
@@ -5,7 +5,6 @@
#include "chrome/browser/browsing_data_remover.h"
#include "chrome/browser/chrome_thread.h"
-#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/profile.h"
@@ -133,18 +132,17 @@
if (remove_mask & REMOVE_CACHE) {
// Invoke ClearBrowsingDataView::ClearCache on the IO thread.
- base::Thread* thread = g_browser_process->io_thread();
- if (thread) {
- waiting_for_clear_cache_ = true;
- UserMetrics::RecordAction(L"ClearBrowsingData_Cache", profile_);
- thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
- this,
- &BrowsingDataRemover::ClearCacheOnIOThread,
- profile_->GetRequestContext(),
- delete_begin_,
- delete_end_,
- MessageLoop::current()));
- }
+ waiting_for_clear_cache_ = true;
+ UserMetrics::RecordAction(L"ClearBrowsingData_Cache", profile_);
+ ChromeThread::PostTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ this,
+ &BrowsingDataRemover::ClearCacheOnIOThread,
+ profile_->GetRequestContext(),
+ delete_begin_,
+ delete_end_,
+ MessageLoop::current()));
}
NotifyAndDeleteIfDone();
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chrome_plugin_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698