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

Side by Side Diff: ios/chrome/browser/passwords/password_generation_agent.mm

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/passwords/password_generation_agent.h" 5 #import "ios/chrome/browser/passwords/password_generation_agent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #import "base/ios/weak_nsobject.h" 9 #import "base/ios/weak_nsobject.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 passwordManagerDriver:(password_manager::PasswordManagerDriver*)driver 114 passwordManagerDriver:(password_manager::PasswordManagerDriver*)driver
115 JSPasswordManager:(JsPasswordManager*)JSPasswordManager 115 JSPasswordManager:(JsPasswordManager*)JSPasswordManager
116 JSSuggestionManager:(JsSuggestionManager*)JSSuggestionManager 116 JSSuggestionManager:(JsSuggestionManager*)JSSuggestionManager
117 passwordsUiDelegate:(id<PasswordsUiDelegate>)UIDelegate 117 passwordsUiDelegate:(id<PasswordsUiDelegate>)UIDelegate
118 NS_DESIGNATED_INITIALIZER; 118 NS_DESIGNATED_INITIALIZER;
119 119
120 @end 120 @end
121 121
122 @implementation PasswordGenerationAgent { 122 @implementation PasswordGenerationAgent {
123 // Bridge to observe the web state from Objective-C. 123 // Bridge to observe the web state from Objective-C.
124 scoped_ptr<web::WebStateObserverBridge> _webStateObserverBridge; 124 std::unique_ptr<web::WebStateObserverBridge> _webStateObserverBridge;
125 125
126 // The origin URLs of forms on the current page that contain account creation 126 // The origin URLs of forms on the current page that contain account creation
127 // forms as reported by autofill. 127 // forms as reported by autofill.
128 std::vector<GURL> _accountCreationFormOrigins; 128 std::vector<GURL> _accountCreationFormOrigins;
129 129
130 // The origin URLs of forms on the current page that have not been blacklisted 130 // The origin URLs of forms on the current page that have not been blacklisted
131 // by the password manager. 131 // by the password manager.
132 std::vector<GURL> _allowedGenerationFormOrigins; 132 std::vector<GURL> _allowedGenerationFormOrigins;
133 133
134 // Stores the account creation form we detected on the page. 134 // Stores the account creation form we detected on the page.
135 scoped_ptr<autofill::PasswordForm> _possibleAccountCreationForm; 135 std::unique_ptr<autofill::PasswordForm> _possibleAccountCreationForm;
136 136
137 // Password fields found in |_possibleAccountCreationForm|. 137 // Password fields found in |_possibleAccountCreationForm|.
138 std::vector<autofill::FormFieldData> _passwordFields; 138 std::vector<autofill::FormFieldData> _passwordFields;
139 139
140 // The password field that triggers the password generation UI. 140 // The password field that triggers the password generation UI.
141 scoped_ptr<autofill::FormFieldData> _passwordGenerationField; 141 std::unique_ptr<autofill::FormFieldData> _passwordGenerationField;
142 142
143 // Wrapper for suggestion JavaScript. Used for form navigation. 143 // Wrapper for suggestion JavaScript. Used for form navigation.
144 base::scoped_nsobject<JsSuggestionManager> _JSSuggestionManager; 144 base::scoped_nsobject<JsSuggestionManager> _JSSuggestionManager;
145 145
146 // Wrapper for passwords JavaScript. Used for form filling. 146 // Wrapper for passwords JavaScript. Used for form filling.
147 base::scoped_nsobject<JsPasswordManager> _JSPasswordManager; 147 base::scoped_nsobject<JsPasswordManager> _JSPasswordManager;
148 148
149 // Driver that is passed to PasswordManager when a password is generated. 149 // Driver that is passed to PasswordManager when a password is generated.
150 password_manager::PasswordManagerDriver* _passwordManagerDriver; 150 password_manager::PasswordManagerDriver* _passwordManagerDriver;
151 151
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 DCHECK(_accessoryViewReadyCompletion); 459 DCHECK(_accessoryViewReadyCompletion);
460 _accessoryViewReadyCompletion.get()([self currentAccessoryView], self); 460 _accessoryViewReadyCompletion.get()([self currentAccessoryView], self);
461 } 461 }
462 462
463 - (BOOL)getLogKeyboardAccessoryMetrics { 463 - (BOOL)getLogKeyboardAccessoryMetrics {
464 // Only store metrics for regular Autofill, not passwords. 464 // Only store metrics for regular Autofill, not passwords.
465 return NO; 465 return NO;
466 } 466 }
467 467
468 @end 468 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698