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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 origin_set_mask_); 621 origin_set_mask_);
622 content::NotificationService::current()->Notify( 622 content::NotificationService::current()->Notify(
623 chrome::NOTIFICATION_BROWSING_DATA_REMOVED, 623 chrome::NOTIFICATION_BROWSING_DATA_REMOVED,
624 content::Source<Profile>(profile_), 624 content::Source<Profile>(profile_),
625 content::Details<BrowsingDataRemover::NotificationDetails>(&details)); 625 content::Details<BrowsingDataRemover::NotificationDetails>(&details));
626 626
627 FOR_EACH_OBSERVER(Observer, observer_list_, OnBrowsingDataRemoverDone()); 627 FOR_EACH_OBSERVER(Observer, observer_list_, OnBrowsingDataRemoverDone());
628 628
629 // History requests aren't happy if you delete yourself from the callback. 629 // History requests aren't happy if you delete yourself from the callback.
630 // As such, we do a delete later. 630 // As such, we do a delete later.
631 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 631 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
632 } 632 }
633 633
634 void BrowsingDataRemover::OnClearedHostnameResolutionCache() { 634 void BrowsingDataRemover::OnClearedHostnameResolutionCache() {
635 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 635 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
636 waiting_for_clear_hostname_resolution_cache_ = false; 636 waiting_for_clear_hostname_resolution_cache_ = false;
637 NotifyAndDeleteIfDone(); 637 NotifyAndDeleteIfDone();
638 } 638 }
639 639
640 void BrowsingDataRemover::ClearHostnameResolutionCacheOnIOThread( 640 void BrowsingDataRemover::ClearHostnameResolutionCacheOnIOThread(
641 IOThread* io_thread) { 641 IOThread* io_thread) {
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 BrowserThread::UI, FROM_HERE, 1075 BrowserThread::UI, FROM_HERE,
1076 base::Bind(&BrowsingDataRemover::OnClearedFormData, 1076 base::Bind(&BrowsingDataRemover::OnClearedFormData,
1077 base::Unretained(this))); 1077 base::Unretained(this)));
1078 } 1078 }
1079 1079
1080 void BrowsingDataRemover::OnClearedFormData() { 1080 void BrowsingDataRemover::OnClearedFormData() {
1081 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1081 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1082 waiting_for_clear_form_ = false; 1082 waiting_for_clear_form_ = false;
1083 NotifyAndDeleteIfDone(); 1083 NotifyAndDeleteIfDone();
1084 } 1084 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698