Chromium Code Reviews| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 } | 347 } |
| 348 | 348 |
| 349 void BrowsingDataRemover::SetRemoving(bool is_removing) { | 349 void BrowsingDataRemover::SetRemoving(bool is_removing) { |
| 350 DCHECK_NE(is_removing_, is_removing); | 350 DCHECK_NE(is_removing_, is_removing); |
| 351 is_removing_ = is_removing; | 351 is_removing_ = is_removing; |
| 352 } | 352 } |
| 353 | 353 |
| 354 void BrowsingDataRemover::Remove(const TimeRange& time_range, | 354 void BrowsingDataRemover::Remove(const TimeRange& time_range, |
| 355 int remove_mask, | 355 int remove_mask, |
| 356 int origin_type_mask) { | 356 int origin_type_mask) { |
| 357 if (is_removing_) | |
|
Bernhard Bauer
2016/05/05 10:06:47
I'm not sure if silently returning is the right th
| |
| 358 return; | |
| 357 // Any instance of BrowsingDataFilterBuilder that |IsEmptyBlacklist()| | 359 // Any instance of BrowsingDataFilterBuilder that |IsEmptyBlacklist()| |
| 358 // is OK to pass here. | 360 // is OK to pass here. |
| 359 RegistrableDomainFilterBuilder builder( | 361 RegistrableDomainFilterBuilder builder( |
| 360 RegistrableDomainFilterBuilder::BLACKLIST); | 362 RegistrableDomainFilterBuilder::BLACKLIST); |
| 361 DCHECK(builder.IsEmptyBlacklist()); | 363 DCHECK(builder.IsEmptyBlacklist()); |
| 362 RemoveImpl(time_range, remove_mask, builder, origin_type_mask); | 364 RemoveImpl(time_range, remove_mask, builder, origin_type_mask); |
| 363 } | 365 } |
| 364 | 366 |
| 365 void BrowsingDataRemover::RemoveWithFilter( | 367 void BrowsingDataRemover::RemoveWithFilter( |
| 366 const TimeRange& time_range, | 368 const TimeRange& time_range, |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1316 waiting_for_clear_domain_reliability_monitor_ = false; | 1318 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1317 NotifyIfDone(); | 1319 NotifyIfDone(); |
| 1318 } | 1320 } |
| 1319 | 1321 |
| 1320 // static | 1322 // static |
| 1321 BrowsingDataRemover::CallbackSubscription | 1323 BrowsingDataRemover::CallbackSubscription |
| 1322 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1324 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
| 1323 const BrowsingDataRemover::Callback& callback) { | 1325 const BrowsingDataRemover::Callback& callback) { |
| 1324 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1326 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
| 1325 } | 1327 } |
| OLD | NEW |