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

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

Issue 1586833002: Convert Pass()→std::move() for iOS build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental //base change Created 4 years, 11 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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698