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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { | 462 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { |
463 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); | 463 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); |
464 | 464 |
465 storage_partition_remove_mask |= | 465 storage_partition_remove_mask |= |
466 content::StoragePartition::REMOVE_DATA_MASK_COOKIES; | 466 content::StoragePartition::REMOVE_DATA_MASK_COOKIES; |
467 | 467 |
468 // Also delete the LoggedIn Predictor, which tries to keep track of which | 468 // Also delete the LoggedIn Predictor, which tries to keep track of which |
469 // sites a user is logged into. | 469 // sites a user is logged into. |
470 ClearLoggedInPredictor(); | 470 ClearLoggedInPredictor(); |
471 | 471 |
472 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) | 472 #if defined(SAFE_BROWSING_SERVICE) |
473 // Clear the safebrowsing cookies only if time period is for "all time". It | 473 // Clear the safebrowsing cookies only if time period is for "all time". It |
474 // doesn't make sense to apply the time period of deleting in the last X | 474 // doesn't make sense to apply the time period of deleting in the last X |
475 // hours/days to the safebrowsing cookies since they aren't the result of | 475 // hours/days to the safebrowsing cookies since they aren't the result of |
476 // any user action. | 476 // any user action. |
477 if (delete_begin_ == base::Time()) { | 477 if (delete_begin_ == base::Time()) { |
478 SafeBrowsingService* sb_service = | 478 SafeBrowsingService* sb_service = |
479 g_browser_process->safe_browsing_service(); | 479 g_browser_process->safe_browsing_service(); |
480 if (sb_service) { | 480 if (sb_service) { |
481 net::URLRequestContextGetter* sb_context = | 481 net::URLRequestContextGetter* sb_context = |
482 sb_service->url_request_context(); | 482 sb_service->url_request_context(); |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 waiting_for_clear_domain_reliability_monitor_ = false; | 1133 waiting_for_clear_domain_reliability_monitor_ = false; |
1134 NotifyAndDeleteIfDone(); | 1134 NotifyAndDeleteIfDone(); |
1135 } | 1135 } |
1136 | 1136 |
1137 // static | 1137 // static |
1138 BrowsingDataRemover::CallbackSubscription | 1138 BrowsingDataRemover::CallbackSubscription |
1139 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1139 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
1140 const BrowsingDataRemover::Callback& callback) { | 1140 const BrowsingDataRemover::Callback& callback) { |
1141 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1141 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
1142 } | 1142 } |
OLD | NEW |