Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698