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

Side by Side Diff: ios/chrome/browser/ui/commands/clear_browsing_data_command.mm

Issue 2270063005: Add support for time based deletion of browsing data on iOS (Closed)
Patch Set: Added partial removal for cache Created 4 years, 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "ios/chrome/browser/ui/commands/clear_browsing_data_command.h" 5 #import "ios/chrome/browser/ui/commands/clear_browsing_data_command.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" 8 #include "ios/chrome/browser/ui/commands/ios_command_ids.h"
9 9
10 @implementation ClearBrowsingDataCommand 10 @implementation ClearBrowsingDataCommand
11 11
12 @synthesize browserState = _browserState; 12 @synthesize browserState = _browserState;
13 @synthesize mask = _mask; 13 @synthesize mask = _mask;
14 @synthesize timePeriod = _timePeriod;
14 15
15 - (instancetype)initWithTag:(NSInteger)tag { 16 - (instancetype)initWithTag:(NSInteger)tag {
16 NOTREACHED(); 17 NOTREACHED();
17 return nil; 18 return nil;
18 } 19 }
19 20
20 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState 21 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState
22 mask:(int)mask
23 timePeriod:(browsing_data::TimePeriod)timePeriod {
24 self = [super initWithTag:IDC_CLEAR_BROWSING_DATA_IOS];
25 if (self) {
26 DCHECK(browserState);
27 _browserState = browserState;
28 _mask = mask;
29 _timePeriod = timePeriod;
30 }
31 return self;
32 }
33
34 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState
msramek 2016/08/29 14:20:59 Shouldn't we explicitly initialize _timePeriod to
ioanap 2016/08/30 11:32:08 Done.
21 mask:(int)mask { 35 mask:(int)mask {
22 self = [super initWithTag:IDC_CLEAR_BROWSING_DATA_IOS]; 36 self = [super initWithTag:IDC_CLEAR_BROWSING_DATA_IOS];
23 if (self) { 37 if (self) {
24 DCHECK(browserState); 38 DCHECK(browserState);
25 _browserState = browserState; 39 _browserState = browserState;
26 _mask = mask; 40 _mask = mask;
27 } 41 }
28 return self; 42 return self;
29 } 43 }
30 44
31 @end 45 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698