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

Side by Side Diff: components/password_manager/core/browser/password_form_manager.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "components/password_manager/core/browser/password_form_manager.h" 5 #include "components/password_manager/core/browser/password_form_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 } 1281 }
1282 1282
1283 // If this was a password update, then update all non-best matches entries 1283 // If this was a password update, then update all non-best matches entries
1284 // with the same username and the same old password. 1284 // with the same username and the same old password.
1285 if (update_related_credentials) { 1285 if (update_related_credentials) {
1286 auto updated_password_it = 1286 auto updated_password_it =
1287 best_matches_.find(pending_credentials_.username_value); 1287 best_matches_.find(pending_credentials_.username_value);
1288 DCHECK(best_matches_.end() != updated_password_it); 1288 DCHECK(best_matches_.end() != updated_password_it);
1289 const base::string16& old_password = 1289 const base::string16& old_password =
1290 updated_password_it->second->password_value; 1290 updated_password_it->second->password_value;
1291 for (const auto& not_best_match : not_best_matches_) { 1291 for (auto* not_best_match : not_best_matches_) {
1292 if (not_best_match->username_value == 1292 if (not_best_match->username_value ==
1293 pending_credentials_.username_value && 1293 pending_credentials_.username_value &&
1294 not_best_match->password_value == old_password) { 1294 not_best_match->password_value == old_password) {
1295 credentials_to_update->push_back(*not_best_match); 1295 credentials_to_update->push_back(*not_best_match);
1296 credentials_to_update->back().password_value = 1296 credentials_to_update->back().password_value =
1297 pending_credentials_.password_value; 1297 pending_credentials_.password_value;
1298 } 1298 }
1299 } 1299 }
1300 } 1300 }
1301 1301
1302 return old_primary_key; 1302 return old_primary_key;
1303 } 1303 }
1304 1304
1305 } // namespace password_manager 1305 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698