| 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 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 } | 339 } |
| 340 | 340 |
| 341 void BrowsingDataRemover::Shutdown() { | 341 void BrowsingDataRemover::Shutdown() { |
| 342 history_task_tracker_.TryCancelAll(); | 342 history_task_tracker_.TryCancelAll(); |
| 343 template_url_sub_.reset(); | 343 template_url_sub_.reset(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 void BrowsingDataRemover::SetRemoving(bool is_removing) { | 346 void BrowsingDataRemover::SetRemoving(bool is_removing) { |
| 347 DCHECK_NE(is_removing_, is_removing); | 347 DCHECK_NE(is_removing_, is_removing); |
| 348 is_removing_ = is_removing; | 348 is_removing_ = is_removing; |
| 349 FOR_EACH_OBSERVER(Observer, observer_list_, |
| 350 OnBrowsingDataRemoving(is_removing)); |
| 349 } | 351 } |
| 350 | 352 |
| 351 void BrowsingDataRemover::Remove(const TimeRange& time_range, | 353 void BrowsingDataRemover::Remove(const TimeRange& time_range, |
| 352 int remove_mask, | 354 int remove_mask, |
| 353 int origin_type_mask) { | 355 int origin_type_mask) { |
| 354 // Any instance of BrowsingDataFilterBuilder that |IsEmptyBlacklist()| | 356 // Any instance of BrowsingDataFilterBuilder that |IsEmptyBlacklist()| |
| 355 // is OK to pass here. | 357 // is OK to pass here. |
| 356 RegistrableDomainFilterBuilder builder( | 358 RegistrableDomainFilterBuilder builder( |
| 357 RegistrableDomainFilterBuilder::BLACKLIST); | 359 RegistrableDomainFilterBuilder::BLACKLIST); |
| 358 DCHECK(builder.IsEmptyBlacklist()); | 360 DCHECK(builder.IsEmptyBlacklist()); |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 waiting_for_clear_domain_reliability_monitor_ = false; | 1314 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1313 NotifyIfDone(); | 1315 NotifyIfDone(); |
| 1314 } | 1316 } |
| 1315 | 1317 |
| 1316 // static | 1318 // static |
| 1317 BrowsingDataRemover::CallbackSubscription | 1319 BrowsingDataRemover::CallbackSubscription |
| 1318 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1320 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
| 1319 const BrowsingDataRemover::Callback& callback) { | 1321 const BrowsingDataRemover::Callback& callback) { |
| 1320 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1322 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
| 1321 } | 1323 } |
| OLD | NEW |