OLD | NEW |
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/passwords/password_controller.h" | 5 #import "ios/chrome/browser/passwords/password_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 completionHandler:(void (^)(BOOL))completionHandler { | 307 completionHandler:(void (^)(BOOL))completionHandler { |
308 [self findPasswordFormsWithCompletionHandler:^( | 308 [self findPasswordFormsWithCompletionHandler:^( |
309 const std::vector<autofill::PasswordForm>& forms) { | 309 const std::vector<autofill::PasswordForm>& forms) { |
310 for (const auto& form : forms) { | 310 for (const auto& form : forms) { |
311 autofill::PasswordFormFillData formData; | 311 autofill::PasswordFormFillData formData; |
312 autofill::PasswordFormMap matches; | 312 autofill::PasswordFormMap matches; |
313 // Initialize |matches| to satisfy the expectation from | 313 // Initialize |matches| to satisfy the expectation from |
314 // InitPasswordFormFillData() that the preferred match (3rd parameter) | 314 // InitPasswordFormFillData() that the preferred match (3rd parameter) |
315 // should be one of the |matches|. | 315 // should be one of the |matches|. |
316 auto scoped_form = make_scoped_ptr(new autofill::PasswordForm(form)); | 316 auto scoped_form = make_scoped_ptr(new autofill::PasswordForm(form)); |
317 matches.insert(std::make_pair(form.username_value, scoped_form.Pass())); | 317 matches.insert( |
| 318 std::make_pair(form.username_value, std::move(scoped_form))); |
318 autofill::InitPasswordFormFillData(form, matches, &form, false, false, | 319 autofill::InitPasswordFormFillData(form, matches, &form, false, false, |
319 &formData); | 320 &formData); |
320 [self fillPasswordForm:formData | 321 [self fillPasswordForm:formData |
321 withUsername:base::SysNSStringToUTF16(username) | 322 withUsername:base::SysNSStringToUTF16(username) |
322 password:base::SysNSStringToUTF16(password) | 323 password:base::SysNSStringToUTF16(password) |
323 completionHandler:completionHandler]; | 324 completionHandler:completionHandler]; |
324 } | 325 } |
325 }]; | 326 }]; |
326 } | 327 } |
327 | 328 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 | 789 |
789 - (PasswordManager*)passwordManager { | 790 - (PasswordManager*)passwordManager { |
790 return passwordManager_.get(); | 791 return passwordManager_.get(); |
791 } | 792 } |
792 | 793 |
793 - (JsPasswordManager*)passwordJsManager { | 794 - (JsPasswordManager*)passwordJsManager { |
794 return passwordJsManager_; | 795 return passwordJsManager_; |
795 } | 796 } |
796 | 797 |
797 @end | 798 @end |
OLD | NEW |