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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 if (origin_set_mask_ & BrowsingDataHelper::PROTECTED_WEB) { | 266 if (origin_set_mask_ & BrowsingDataHelper::PROTECTED_WEB) { |
267 content::RecordAction( | 267 content::RecordAction( |
268 UserMetricsAction("ClearBrowsingData_MaskContainsProtectedWeb")); | 268 UserMetricsAction("ClearBrowsingData_MaskContainsProtectedWeb")); |
269 } | 269 } |
270 if (origin_set_mask_ & BrowsingDataHelper::EXTENSION) { | 270 if (origin_set_mask_ & BrowsingDataHelper::EXTENSION) { |
271 content::RecordAction( | 271 content::RecordAction( |
272 UserMetricsAction("ClearBrowsingData_MaskContainsExtension")); | 272 UserMetricsAction("ClearBrowsingData_MaskContainsExtension")); |
273 } | 273 } |
274 // If this fires, we added a new BrowsingDataHelper::OriginSetMask without | 274 // If this fires, we added a new BrowsingDataHelper::OriginSetMask without |
275 // updating the user metrics above. | 275 // updating the user metrics above. |
276 COMPILE_ASSERT( | 276 static_assert( |
277 BrowsingDataHelper::ALL == (BrowsingDataHelper::UNPROTECTED_WEB | | 277 BrowsingDataHelper::ALL == (BrowsingDataHelper::UNPROTECTED_WEB | |
278 BrowsingDataHelper::PROTECTED_WEB | | 278 BrowsingDataHelper::PROTECTED_WEB | |
279 BrowsingDataHelper::EXTENSION), | 279 BrowsingDataHelper::EXTENSION), |
280 forgotten_to_add_origin_mask_type); | 280 "OriginSetMask has been updated without updating user metrics"); |
281 | 281 |
282 if ((remove_mask & REMOVE_HISTORY) && may_delete_history) { | 282 if ((remove_mask & REMOVE_HISTORY) && may_delete_history) { |
283 HistoryService* history_service = HistoryServiceFactory::GetForProfile( | 283 HistoryService* history_service = HistoryServiceFactory::GetForProfile( |
284 profile_, Profile::EXPLICIT_ACCESS); | 284 profile_, Profile::EXPLICIT_ACCESS); |
285 if (history_service) { | 285 if (history_service) { |
286 std::set<GURL> restrict_urls; | 286 std::set<GURL> restrict_urls; |
287 if (!remove_origin_.is_empty()) | 287 if (!remove_origin_.is_empty()) |
288 restrict_urls.insert(remove_origin_); | 288 restrict_urls.insert(remove_origin_); |
289 content::RecordAction(UserMetricsAction("ClearBrowsingData_History")); | 289 content::RecordAction(UserMetricsAction("ClearBrowsingData_History")); |
290 waiting_for_clear_history_ = true; | 290 waiting_for_clear_history_ = true; |
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 waiting_for_clear_webrtc_logs_ = false; | 1192 waiting_for_clear_webrtc_logs_ = false; |
1193 NotifyAndDeleteIfDone(); | 1193 NotifyAndDeleteIfDone(); |
1194 } | 1194 } |
1195 #endif | 1195 #endif |
1196 | 1196 |
1197 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { | 1197 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { |
1198 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1198 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
1199 waiting_for_clear_domain_reliability_monitor_ = false; | 1199 waiting_for_clear_domain_reliability_monitor_ = false; |
1200 NotifyAndDeleteIfDone(); | 1200 NotifyAndDeleteIfDone(); |
1201 } | 1201 } |
OLD | NEW |