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

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

Issue 1869473002: Fixed crash on double profile delete operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch redone Created 4 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <string> 9 #include <string>
10 10
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698