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

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

Issue 1730313004: Remove PasswordStore::AuthorizationPromptPolicy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 "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 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 1200
1201 bool PasswordStoreMac::RemoveStatisticsCreatedBetweenImpl( 1201 bool PasswordStoreMac::RemoveStatisticsCreatedBetweenImpl(
1202 base::Time delete_begin, 1202 base::Time delete_begin,
1203 base::Time delete_end) { 1203 base::Time delete_end) {
1204 return login_metadata_db_ && 1204 return login_metadata_db_ &&
1205 login_metadata_db_->stats_table().RemoveStatsBetween(delete_begin, 1205 login_metadata_db_->stats_table().RemoveStatsBetween(delete_begin,
1206 delete_end); 1206 delete_end);
1207 } 1207 }
1208 1208
1209 ScopedVector<autofill::PasswordForm> PasswordStoreMac::FillMatchingLogins( 1209 ScopedVector<autofill::PasswordForm> PasswordStoreMac::FillMatchingLogins(
1210 const autofill::PasswordForm& form, 1210 const autofill::PasswordForm& form) {
1211 AuthorizationPromptPolicy prompt_policy) {
1212 chrome::ScopedSecKeychainSetUserInteractionAllowed user_interaction_allowed( 1211 chrome::ScopedSecKeychainSetUserInteractionAllowed user_interaction_allowed(
1213 prompt_policy == ALLOW_PROMPT); 1212 false);
1214 1213
1215 ScopedVector<PasswordForm> database_forms; 1214 ScopedVector<PasswordForm> database_forms;
1216 if (!login_metadata_db_ || 1215 if (!login_metadata_db_ ||
1217 !login_metadata_db_->GetLogins(form, &database_forms)) { 1216 !login_metadata_db_->GetLogins(form, &database_forms)) {
1218 return ScopedVector<autofill::PasswordForm>(); 1217 return ScopedVector<autofill::PasswordForm>();
1219 } 1218 }
1220 1219
1221 // Let's gather all signon realms we want to match with keychain entries. 1220 // Let's gather all signon realms we want to match with keychain entries.
1222 std::set<std::string> realm_set; 1221 std::set<std::string> realm_set;
1223 realm_set.insert(form.signon_realm); 1222 realm_set.insert(form.signon_realm);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 ScopedVector<PasswordForm> forms_with_keychain_entry; 1366 ScopedVector<PasswordForm> forms_with_keychain_entry;
1368 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, 1367 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms,
1369 &forms_with_keychain_entry); 1368 &forms_with_keychain_entry);
1370 1369
1371 // Clean up any orphaned database entries. 1370 // Clean up any orphaned database entries.
1372 RemoveDatabaseForms(&database_forms); 1371 RemoveDatabaseForms(&database_forms);
1373 1372
1374 // Move the orphaned DB forms to the output parameter. 1373 // Move the orphaned DB forms to the output parameter.
1375 AppendSecondToFirst(orphaned_forms, &database_forms); 1374 AppendSecondToFirst(orphaned_forms, &database_forms);
1376 } 1375 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_mac.h ('k') | chrome/browser/password_manager/password_store_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698