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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 // don't accidentally remove the cookies that are associated with the | 454 // don't accidentally remove the cookies that are associated with the |
455 // UNPROTECTED_WEB origin. This is necessary because cookies are not separated | 455 // UNPROTECTED_WEB origin. This is necessary because cookies are not separated |
456 // between UNPROTECTED_WEB and PROTECTED_WEB. | 456 // between UNPROTECTED_WEB and PROTECTED_WEB. |
457 if (remove_mask & REMOVE_COOKIES && | 457 if (remove_mask & REMOVE_COOKIES && |
458 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { | 458 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { |
459 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); | 459 content::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); |
460 | 460 |
461 storage_partition_remove_mask |= | 461 storage_partition_remove_mask |= |
462 content::StoragePartition::REMOVE_DATA_MASK_COOKIES; | 462 content::StoragePartition::REMOVE_DATA_MASK_COOKIES; |
463 | 463 |
464 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) | 464 #if defined(SAFE_BROWSING_SERVICE) |
465 // Clear the safebrowsing cookies only if time period is for "all time". It | 465 // Clear the safebrowsing cookies only if time period is for "all time". It |
466 // doesn't make sense to apply the time period of deleting in the last X | 466 // doesn't make sense to apply the time period of deleting in the last X |
467 // hours/days to the safebrowsing cookies since they aren't the result of | 467 // hours/days to the safebrowsing cookies since they aren't the result of |
468 // any user action. | 468 // any user action. |
469 if (delete_begin_ == base::Time()) { | 469 if (delete_begin_ == base::Time()) { |
470 SafeBrowsingService* sb_service = | 470 SafeBrowsingService* sb_service = |
471 g_browser_process->safe_browsing_service(); | 471 g_browser_process->safe_browsing_service(); |
472 if (sb_service) { | 472 if (sb_service) { |
473 net::URLRequestContextGetter* sb_context = | 473 net::URLRequestContextGetter* sb_context = |
474 sb_service->url_request_context(); | 474 sb_service->url_request_context(); |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 waiting_for_clear_domain_reliability_monitor_ = false; | 1090 waiting_for_clear_domain_reliability_monitor_ = false; |
1091 NotifyAndDeleteIfDone(); | 1091 NotifyAndDeleteIfDone(); |
1092 } | 1092 } |
1093 | 1093 |
1094 // static | 1094 // static |
1095 BrowsingDataRemover::CallbackSubscription | 1095 BrowsingDataRemover::CallbackSubscription |
1096 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1096 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
1097 const BrowsingDataRemover::Callback& callback) { | 1097 const BrowsingDataRemover::Callback& callback) { |
1098 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1098 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
1099 } | 1099 } |
OLD | NEW |