| 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 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 if (service) { | 986 if (service) { |
| 987 domain_reliability::DomainReliabilityClearMode mode; | 987 domain_reliability::DomainReliabilityClearMode mode; |
| 988 if (remove_mask & REMOVE_COOKIES) | 988 if (remove_mask & REMOVE_COOKIES) |
| 989 mode = domain_reliability::CLEAR_CONTEXTS; | 989 mode = domain_reliability::CLEAR_CONTEXTS; |
| 990 else | 990 else |
| 991 mode = domain_reliability::CLEAR_BEACONS; | 991 mode = domain_reliability::CLEAR_BEACONS; |
| 992 | 992 |
| 993 waiting_for_clear_domain_reliability_monitor_ = true; | 993 waiting_for_clear_domain_reliability_monitor_ = true; |
| 994 service->ClearBrowsingData( | 994 service->ClearBrowsingData( |
| 995 mode, | 995 mode, |
| 996 filter, |
| 996 base::Bind(&BrowsingDataRemover::OnClearedDomainReliabilityMonitor, | 997 base::Bind(&BrowsingDataRemover::OnClearedDomainReliabilityMonitor, |
| 997 weak_ptr_factory_.GetWeakPtr())); | 998 weak_ptr_factory_.GetWeakPtr())); |
| 998 } | 999 } |
| 999 } | 1000 } |
| 1000 | 1001 |
| 1001 #if BUILDFLAG(ANDROID_JAVA_UI) | 1002 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 1002 if (remove_mask & REMOVE_WEBAPP_DATA) { | 1003 if (remove_mask & REMOVE_WEBAPP_DATA) { |
| 1003 // Clear all data associated with registered webapps. The webapp_registry | 1004 // Clear all data associated with registered webapps. The webapp_registry |
| 1004 // makes a JNI call into a Java-side AsyncTask, so don't wait for the reply. | 1005 // makes a JNI call into a Java-side AsyncTask, so don't wait for the reply. |
| 1005 waiting_for_clear_webapp_data_ = true; | 1006 waiting_for_clear_webapp_data_ = true; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 waiting_for_clear_domain_reliability_monitor_ = false; | 1313 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1313 NotifyIfDone(); | 1314 NotifyIfDone(); |
| 1314 } | 1315 } |
| 1315 | 1316 |
| 1316 // static | 1317 // static |
| 1317 BrowsingDataRemover::CallbackSubscription | 1318 BrowsingDataRemover::CallbackSubscription |
| 1318 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1319 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
| 1319 const BrowsingDataRemover::Callback& callback) { | 1320 const BrowsingDataRemover::Callback& callback) { |
| 1320 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1321 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
| 1321 } | 1322 } |
| OLD | NEW |