| Index: chrome/browser/browsing_data_remover.cc
|
| diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
|
| index 8a2a8d069eb03097f7d9616e1a2e31d77b12e97f..e906dcc5aa9278f52737f1bb4fa2b1dbbba740bc 100644
|
| --- a/chrome/browser/browsing_data_remover.cc
|
| +++ b/chrome/browser/browsing_data_remover.cc
|
| @@ -45,7 +45,7 @@
|
| #include "content/browser/in_process_webkit/webkit_context.h"
|
| #include "content/browser/user_metrics.h"
|
| #include "content/public/browser/browser_thread.h"
|
| -#include "content/public/browser/notification_source.h"
|
| +#include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/plugin_data_remover.h"
|
| #include "net/base/cookie_monster.h"
|
| #include "net/base/net_errors.h"
|
| @@ -84,7 +84,8 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
|
| waiting_for_clear_networking_history_(false),
|
| waiting_for_clear_cookies_(false),
|
| waiting_for_clear_cache_(false),
|
| - waiting_for_clear_lso_data_(false) {
|
| + waiting_for_clear_lso_data_(false),
|
| + remove_mask_(0) {
|
| DCHECK(profile);
|
| }
|
|
|
| @@ -107,7 +108,8 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
|
| waiting_for_clear_networking_history_(false),
|
| waiting_for_clear_cookies_(false),
|
| waiting_for_clear_cache_(false),
|
| - waiting_for_clear_lso_data_(false) {
|
| + waiting_for_clear_lso_data_(false),
|
| + remove_mask_(0) {
|
| DCHECK(profile);
|
| }
|
|
|
| @@ -124,6 +126,7 @@ void BrowsingDataRemover::set_removing(bool removing) {
|
| void BrowsingDataRemover::Remove(int remove_mask) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| set_removing(true);
|
| + remove_mask_ = remove_mask;
|
|
|
| if (remove_mask & REMOVE_HISTORY) {
|
| HistoryService* history_service =
|
| @@ -370,6 +373,14 @@ void BrowsingDataRemover::NotifyAndDeleteIfDone() {
|
| g_browser_process->net_log()->ClearAllPassivelyCapturedEvents();
|
|
|
| set_removing(false);
|
| +
|
| + // Send global notification, then notify any explicit observers.
|
| + BrowsingDataRemoverNotificationDetail details(delete_begin_, remove_mask_);
|
| + content::NotificationService::current()->Notify(
|
| + chrome::NOTIFICATION_BROWSING_DATA_REMOVED,
|
| + content::Source<Profile>(profile_->GetOriginalProfile()),
|
| + content::Details<BrowsingDataRemoverNotificationDetail>(&details));
|
| +
|
| FOR_EACH_OBSERVER(Observer, observer_list_, OnBrowsingDataRemoverDone());
|
|
|
| // History requests aren't happy if you delete yourself from the callback.
|
|
|