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