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

Side by Side Diff: chrome/browser/password_manager/password_store_mac.cc

Issue 2169263002: chrome/browser/password_manager: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « chrome/browser/password_manager/password_manager_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/password_manager/password_store_mac.h" 5 #include "chrome/browser/password_manager/password_store_mac.h"
6 6
7 #include <CoreServices/CoreServices.h> 7 #include <CoreServices/CoreServices.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 merged_forms->push_back(std::move(form)); 539 merged_forms->push_back(std::move(form));
540 } else { 540 } else {
541 unused_database_forms.push_back(std::move(form)); 541 unused_database_forms.push_back(std::move(form));
542 } 542 }
543 }); 543 });
544 database_forms->swap(unused_database_forms); 544 database_forms->swap(unused_database_forms);
545 545
546 // Clear out all the Keychain entries we used. 546 // Clear out all the Keychain entries we used.
547 ScopedVector<autofill::PasswordForm> unused_keychain_forms; 547 ScopedVector<autofill::PasswordForm> unused_keychain_forms;
548 unused_keychain_forms.reserve(keychain_forms->size()); 548 unused_keychain_forms.reserve(keychain_forms->size());
549 for (auto& keychain_form : *keychain_forms) { 549 for (auto*& keychain_form : *keychain_forms) {
550 if (!ContainsKey(used_keychain_forms, keychain_form)) { 550 if (!ContainsKey(used_keychain_forms, keychain_form)) {
551 unused_keychain_forms.push_back(keychain_form); 551 unused_keychain_forms.push_back(keychain_form);
552 keychain_form = nullptr; 552 keychain_form = nullptr;
553 } 553 }
554 } 554 }
555 keychain_forms->swap(unused_keychain_forms); 555 keychain_forms->swap(unused_keychain_forms);
556 } 556 }
557 557
558 std::vector<ItemFormPair> ExtractAllKeychainItemAttributesIntoPasswordForms( 558 std::vector<ItemFormPair> ExtractAllKeychainItemAttributesIntoPasswordForms(
559 std::vector<SecKeychainItemRef>* keychain_items, 559 std::vector<SecKeychainItemRef>* keychain_items,
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 ScopedVector<PasswordForm> forms_with_keychain_entry; 1397 ScopedVector<PasswordForm> forms_with_keychain_entry;
1398 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, 1398 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms,
1399 &forms_with_keychain_entry); 1399 &forms_with_keychain_entry);
1400 1400
1401 // Clean up any orphaned database entries. 1401 // Clean up any orphaned database entries.
1402 RemoveDatabaseForms(&database_forms); 1402 RemoveDatabaseForms(&database_forms);
1403 1403
1404 // Move the orphaned DB forms to the output parameter. 1404 // Move the orphaned DB forms to the output parameter.
1405 AppendSecondToFirst(orphaned_forms, &database_forms); 1405 AppendSecondToFirst(orphaned_forms, &database_forms);
1406 } 1406 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_manager_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698