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

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

Issue 2899083004: Implement PasswordStore::GetLoginsForSameOrganizationName. (Closed)
Patch Set: Rebase. Created 3 years, 6 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 <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 AppendSecondToFirst(&matched_forms, &keychain_forms); 1254 AppendSecondToFirst(&matched_forms, &keychain_forms);
1255 1255
1256 if (!database_forms.empty()) { 1256 if (!database_forms.empty()) {
1257 RemoveDatabaseForms(&database_forms); 1257 RemoveDatabaseForms(&database_forms);
1258 NotifyLoginsChanged(FormsToRemoveChangeList(database_forms)); 1258 NotifyLoginsChanged(FormsToRemoveChangeList(database_forms));
1259 } 1259 }
1260 1260
1261 return matched_forms; 1261 return matched_forms;
1262 } 1262 }
1263 1263
1264 std::vector<std::unique_ptr<autofill::PasswordForm>>
1265 PasswordStoreMac::FillLoginsForSameOrganizationName(
1266 const std::string& signon_realm) {
1267 // Not implemented.
1268 return std::vector<std::unique_ptr<autofill::PasswordForm>>();
1269 }
1270
1264 bool PasswordStoreMac::FillAutofillableLogins( 1271 bool PasswordStoreMac::FillAutofillableLogins(
1265 std::vector<std::unique_ptr<PasswordForm>>* forms) { 1272 std::vector<std::unique_ptr<PasswordForm>>* forms) {
1266 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread()); 1273 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread());
1267 forms->clear(); 1274 forms->clear();
1268 1275
1269 std::vector<std::unique_ptr<PasswordForm>> database_forms; 1276 std::vector<std::unique_ptr<PasswordForm>> database_forms;
1270 if (!login_metadata_db_ || 1277 if (!login_metadata_db_ ||
1271 !login_metadata_db_->GetAutofillableLogins(&database_forms)) 1278 !login_metadata_db_->GetAutofillableLogins(&database_forms))
1272 return false; 1279 return false;
1273 1280
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 std::vector<std::unique_ptr<PasswordForm>> forms_with_keychain_entry; 1386 std::vector<std::unique_ptr<PasswordForm>> forms_with_keychain_entry;
1380 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, 1387 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms,
1381 &forms_with_keychain_entry); 1388 &forms_with_keychain_entry);
1382 1389
1383 // Clean up any orphaned database entries. 1390 // Clean up any orphaned database entries.
1384 RemoveDatabaseForms(&database_forms); 1391 RemoveDatabaseForms(&database_forms);
1385 1392
1386 // Move the orphaned DB forms to the output parameter. 1393 // Move the orphaned DB forms to the output parameter.
1387 AppendSecondToFirst(orphaned_forms, &database_forms); 1394 AppendSecondToFirst(orphaned_forms, &database_forms);
1388 } 1395 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_mac.h ('k') | chrome/browser/password_manager/password_store_proxy_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698