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

Side by Side Diff: ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.mm

Issue 2671743002: Separate state of basic and advanced tab in CBD dialog (Closed)
Patch Set: rebase and fix compilation Created 3 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.h" 5 #include "ios/chrome/browser/browsing_data/ios_chrome_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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 int removal_mask) 89 int removal_mask)
90 : removal_begin(removal_begin), removal_mask(removal_mask) {} 90 : removal_begin(removal_begin), removal_mask(removal_mask) {}
91 91
92 IOSChromeBrowsingDataRemover::NotificationDetails::~NotificationDetails() {} 92 IOSChromeBrowsingDataRemover::NotificationDetails::~NotificationDetails() {}
93 93
94 // Static. 94 // Static.
95 IOSChromeBrowsingDataRemover* IOSChromeBrowsingDataRemover::CreateForPeriod( 95 IOSChromeBrowsingDataRemover* IOSChromeBrowsingDataRemover::CreateForPeriod(
96 ios::ChromeBrowserState* browser_state, 96 ios::ChromeBrowserState* browser_state,
97 browsing_data::TimePeriod period) { 97 browsing_data::TimePeriod period) {
98 switch (period) { 98 switch (period) {
99 case browsing_data::LAST_HOUR: 99 case browsing_data::TimePeriod::LAST_HOUR:
100 base::RecordAction(UserMetricsAction("ClearBrowsingData_LastHour")); 100 base::RecordAction(UserMetricsAction("ClearBrowsingData_LastHour"));
101 break; 101 break;
102 case browsing_data::LAST_DAY: 102 case browsing_data::TimePeriod::LAST_DAY:
103 base::RecordAction(UserMetricsAction("ClearBrowsingData_LastDay")); 103 base::RecordAction(UserMetricsAction("ClearBrowsingData_LastDay"));
104 break; 104 break;
105 case browsing_data::LAST_WEEK: 105 case browsing_data::TimePeriod::LAST_WEEK:
106 base::RecordAction(UserMetricsAction("ClearBrowsingData_LastWeek")); 106 base::RecordAction(UserMetricsAction("ClearBrowsingData_LastWeek"));
107 break; 107 break;
108 case browsing_data::FOUR_WEEKS: 108 case browsing_data::TimePeriod::FOUR_WEEKS:
109 base::RecordAction(UserMetricsAction("ClearBrowsingData_LastMonth")); 109 base::RecordAction(UserMetricsAction("ClearBrowsingData_LastMonth"));
110 break; 110 break;
111 case browsing_data::ALL_TIME: 111 case browsing_data::TimePeriod::ALL_TIME:
112 base::RecordAction(UserMetricsAction("ClearBrowsingData_Everything")); 112 base::RecordAction(UserMetricsAction("ClearBrowsingData_Everything"));
113 break; 113 break;
114 } 114 }
115 return new IOSChromeBrowsingDataRemover( 115 return new IOSChromeBrowsingDataRemover(
116 browser_state, browsing_data::CalculateBeginDeleteTime(period), 116 browser_state, browsing_data::CalculateBeginDeleteTime(period),
117 base::Time::Max()); 117 base::Time::Max());
118 } 118 }
119 119
120 IOSChromeBrowsingDataRemover::IOSChromeBrowsingDataRemover( 120 IOSChromeBrowsingDataRemover::IOSChromeBrowsingDataRemover(
121 ios::ChromeBrowserState* browser_state, 121 ios::ChromeBrowserState* browser_state,
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 waiting_for_clear_autofill_origin_urls_ = false; 507 waiting_for_clear_autofill_origin_urls_ = false;
508 NotifyAndDeleteIfDone(); 508 NotifyAndDeleteIfDone();
509 } 509 }
510 510
511 // static 511 // static
512 IOSChromeBrowsingDataRemover::CallbackSubscription 512 IOSChromeBrowsingDataRemover::CallbackSubscription
513 IOSChromeBrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 513 IOSChromeBrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
514 const IOSChromeBrowsingDataRemover::Callback& callback) { 514 const IOSChromeBrowsingDataRemover::Callback& callback) {
515 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 515 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
516 } 516 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/browsing_data/cache_counter_unittest.cc ('k') | ios/chrome/browser/signin/browser_state_data_remover.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698