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

Side by Side Diff: ios/chrome/browser/xcallback_parameters.mm

Issue 1171203004: Correct iOS build for latest Xcode beta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UNAVAILABLE_ATTRIBUTE->NS_UNAVAILABLE Created 5 years, 6 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/xcallback_parameters.h" 5 #import "ios/chrome/browser/xcallback_parameters.h"
6 6
7 #include "base/logging.h"
7 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
8 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
9 10
10 namespace { 11 namespace {
11 NSString* const kSourceAppIdKey = @"sourceAppId"; 12 NSString* const kSourceAppIdKey = @"sourceAppId";
12 NSString* const kSourceAppNameKey = @"sourceAppName"; 13 NSString* const kSourceAppNameKey = @"sourceAppName";
13 NSString* const kSuccessURLKey = @"successURL"; 14 NSString* const kSuccessURLKey = @"successURL";
14 NSString* const kCreateNewTabKey = @"createNewTab"; 15 NSString* const kCreateNewTabKey = @"createNewTab";
15 } 16 }
16 17
17 @interface XCallbackParameters () { 18 @interface XCallbackParameters () {
18 base::scoped_nsobject<NSString> _sourceAppId; 19 base::scoped_nsobject<NSString> _sourceAppId;
19 base::scoped_nsobject<NSString> _sourceAppName; 20 base::scoped_nsobject<NSString> _sourceAppName;
20 GURL _successURL; 21 GURL _successURL;
21 BOOL _createNewTab; 22 BOOL _createNewTab;
22 } 23 }
23 @end 24 @end
24 25
25 @implementation XCallbackParameters 26 @implementation XCallbackParameters
26 27
27 @synthesize successURL = _successURL; 28 @synthesize successURL = _successURL;
28 @synthesize createNewTab = _createNewTab; 29 @synthesize createNewTab = _createNewTab;
29 30
31 - (instancetype)init {
32 NOTREACHED();
33 return nil;
34 }
35
30 - (instancetype)initWithSourceAppId:(NSString*)sourceAppId 36 - (instancetype)initWithSourceAppId:(NSString*)sourceAppId
31 sourceAppName:(NSString*)sourceAppName 37 sourceAppName:(NSString*)sourceAppName
32 successURL:(const GURL&)successURL 38 successURL:(const GURL&)successURL
33 createNewTab:(BOOL)createNewTab { 39 createNewTab:(BOOL)createNewTab {
34 self = [super init]; 40 self = [super init];
35 if (self) { 41 if (self) {
36 _sourceAppId.reset([sourceAppId copy]); 42 _sourceAppId.reset([sourceAppId copy]);
37 _sourceAppName.reset([sourceAppName copy]); 43 _sourceAppName.reset([sourceAppName copy]);
38 _successURL = successURL; 44 _successURL = successURL;
39 _createNewTab = createNewTab; 45 _createNewTab = createNewTab;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 - (instancetype)copyWithZone:(NSZone*)zone { 91 - (instancetype)copyWithZone:(NSZone*)zone {
86 XCallbackParameters* copy = [[[self class] allocWithZone:zone] init]; 92 XCallbackParameters* copy = [[[self class] allocWithZone:zone] init];
87 copy->_sourceAppId.reset([_sourceAppId copy]); 93 copy->_sourceAppId.reset([_sourceAppId copy]);
88 copy->_sourceAppName.reset([_sourceAppName copy]); 94 copy->_sourceAppName.reset([_sourceAppName copy]);
89 copy->_successURL = _successURL; 95 copy->_successURL = _successURL;
90 copy->_createNewTab = _createNewTab; 96 copy->_createNewTab = _createNewTab;
91 return copy; 97 return copy;
92 } 98 }
93 99
94 @end 100 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698