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 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { | 429 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { |
430 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); | 430 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); |
431 | 431 |
432 storage_partition_remove_mask |= | 432 storage_partition_remove_mask |= |
433 content::StoragePartition::REMOVE_DATA_MASK_COOKIES; | 433 content::StoragePartition::REMOVE_DATA_MASK_COOKIES; |
434 | 434 |
435 // Also delete the LoggedIn Predictor, which tries to keep track of which | 435 // Also delete the LoggedIn Predictor, which tries to keep track of which |
436 // sites a user is logged into. | 436 // sites a user is logged into. |
437 ClearLoggedInPredictor(); | 437 ClearLoggedInPredictor(); |
438 | 438 |
439 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) | 439 #if defined(SAFE_BROWSING_SERVICE) |
440 // Clear the safebrowsing cookies only if time period is for "all time". It | 440 // Clear the safebrowsing cookies only if time period is for "all time". It |
441 // doesn't make sense to apply the time period of deleting in the last X | 441 // doesn't make sense to apply the time period of deleting in the last X |
442 // hours/days to the safebrowsing cookies since they aren't the result of | 442 // hours/days to the safebrowsing cookies since they aren't the result of |
443 // any user action. | 443 // any user action. |
444 if (delete_begin_ == base::Time()) { | 444 if (delete_begin_ == base::Time()) { |
445 SafeBrowsingService* sb_service = | 445 SafeBrowsingService* sb_service = |
446 g_browser_process->safe_browsing_service(); | 446 g_browser_process->safe_browsing_service(); |
447 if (sb_service) { | 447 if (sb_service) { |
448 net::URLRequestContextGetter* sb_context = | 448 net::URLRequestContextGetter* sb_context = |
449 sb_service->url_request_context(); | 449 sb_service->url_request_context(); |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 waiting_for_clear_webrtc_logs_ = false; | 1175 waiting_for_clear_webrtc_logs_ = false; |
1176 NotifyAndDeleteIfDone(); | 1176 NotifyAndDeleteIfDone(); |
1177 } | 1177 } |
1178 #endif | 1178 #endif |
1179 | 1179 |
1180 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { | 1180 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { |
1181 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1181 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1182 waiting_for_clear_domain_reliability_monitor_ = false; | 1182 waiting_for_clear_domain_reliability_monitor_ = false; |
1183 NotifyAndDeleteIfDone(); | 1183 NotifyAndDeleteIfDone(); |
1184 } | 1184 } |
OLD | NEW |