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

Side by Side Diff: components/autofill/ios/browser/form_suggestion.mm

Issue 1007813002: [iOS] Upstream autofill component code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added dconnelly to OWNERS Created 5 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "components/autofill/ios/browser/form_suggestion.h"
6
7 @interface FormSuggestion ()
8 // TODO(rohitrao): These properties must be redefined readwrite to work around a
9 // clang bug. crbug.com/228650
10 @property(copy, readwrite) NSString* value;
11 @property(copy, readwrite) NSString* icon;
12
13 // Local initializer for a FormSuggestion.
14 - (id)initWithValue:(NSString*)value
15 displayDescription:(NSString*)displayDescription
16 icon:(NSString*)icon
17 identifier:(NSUInteger)identifier;
18
19 @end
20
21 @implementation FormSuggestion {
22 NSString* _value;
23 NSString* _displayDescription;
24 NSString* _icon;
25 NSUInteger _identifier;
26 base::mac::ObjCPropertyReleaser _propertyReleaser_FormSuggestion;
27 }
28
29 @synthesize value = _value;
30 @synthesize displayDescription = _displayDescription;
31 @synthesize icon = _icon;
32 @synthesize identifier = _identifier;
33
34 - (id)initWithValue:(NSString*)value
35 displayDescription:(NSString*)displayDescription
36 icon:(NSString*)icon
37 identifier:(NSUInteger)identifier {
38 self = [super init];
39 if (self) {
40 _propertyReleaser_FormSuggestion.Init(self, [FormSuggestion class]);
41 _value = [value copy];
42 _displayDescription = [displayDescription copy];
43 _icon = [icon copy];
44 _identifier = identifier;
45 }
46 return self;
47 }
48
49 + (FormSuggestion*)suggestionWithValue:(NSString*)value
50 displayDescription:(NSString*)displayDescription
51 icon:(NSString*)icon
52 identifier:(NSUInteger)identifier {
53 return [[[FormSuggestion alloc] initWithValue:value
54 displayDescription:displayDescription
55 icon:icon
56 identifier:identifier] autorelease];
57 }
58
59 @end
OLDNEW
« no previous file with comments | « components/autofill/ios/browser/form_suggestion.h ('k') | components/autofill/ios/browser/js_autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698