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

Side by Side Diff: ios/chrome/widget_extension/widget_view_controller.mm

Issue 2817003003: Get maximum age of clipboard from clipboard_recent_contents.cc in iOS impl (Closed)
Patch Set: fix generic + rebase Created 3 years, 8 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 | « components/open_from_clipboard/clipboard_recent_content_ios_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/widget_extension/widget_view_controller.h" 5 #import "ios/chrome/widget_extension/widget_view_controller.h"
6 6
7 #import <NotificationCenter/NotificationCenter.h> 7 #import <NotificationCenter/NotificationCenter.h>
8 8
9 #include "base/ios/ios_util.h" 9 #include "base/ios/ios_util.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 @implementation WidgetViewController 48 @implementation WidgetViewController
49 49
50 @synthesize widgetView = _widgetView; 50 @synthesize widgetView = _widgetView;
51 @synthesize copiedURL = _copiedURL; 51 @synthesize copiedURL = _copiedURL;
52 @synthesize clipboardRecentContent = _clipboardRecentContent; 52 @synthesize clipboardRecentContent = _clipboardRecentContent;
53 53
54 - (instancetype)init { 54 - (instancetype)init {
55 self = [super init]; 55 self = [super init];
56 if (self) { 56 if (self) {
57 _clipboardRecentContent = [[ClipboardRecentContentImplIOS alloc] 57 _clipboardRecentContent = [[ClipboardRecentContentImplIOS alloc]
58 initWithAuthorizedSchemes:[NSSet setWithObjects:@"http", @"https", nil] 58 initWithMaxAge:1 * 60 * 60
59 userDefaults:app_group::GetGroupUserDefaults() 59 authorizedSchemes:[NSSet setWithObjects:@"http", @"https", nil]
60 delegate:nil]; 60 userDefaults:app_group::GetGroupUserDefaults()
61 delegate:nil];
61 } 62 }
62 return self; 63 return self;
63 } 64 }
64 65
65 #pragma mark - UIViewController 66 #pragma mark - UIViewController
66 67
67 - (void)viewDidLoad { 68 - (void)viewDidLoad {
68 [super viewDidLoad]; 69 [super viewDidLoad];
69 70
70 // A local variable is necessary here as the property is declared weak and the 71 // A local variable is necessary here as the property is declared weak and the
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 }; 213 };
213 } 214 }
214 return @{ 215 return @{
215 timePrefKey : [NSDate date], 216 timePrefKey : [NSDate date],
216 appPrefKey : @"TodayExtension", 217 appPrefKey : @"TodayExtension",
217 commandPrefKey : command, 218 commandPrefKey : command,
218 }; 219 };
219 } 220 }
220 221
221 @end 222 @end
OLDNEW
« no previous file with comments | « components/open_from_clipboard/clipboard_recent_content_ios_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698