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

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

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Mac fixes 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 "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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } else if (!partial_match) { 222 } else if (!partial_match) {
223 partial_match = keychain_form.get(); 223 partial_match = keychain_form.get();
224 } 224 }
225 } 225 }
226 } 226 }
227 return partial_match; 227 return partial_match;
228 } 228 }
229 229
230 // True if the form has no password to be stored in Keychain. 230 // True if the form has no password to be stored in Keychain.
231 bool IsLoginDatabaseOnlyForm(const PasswordForm& form) { 231 bool IsLoginDatabaseOnlyForm(const PasswordForm& form) {
232 return form.blacklisted_by_user || !form.federation_origin.unique() || 232 return form.blacklisted_by_user || !form.federation_origin.opaque() ||
233 form.scheme == PasswordForm::SCHEME_USERNAME_ONLY; 233 form.scheme == PasswordForm::SCHEME_USERNAME_ONLY;
234 } 234 }
235 235
236 } // namespace 236 } // namespace
237 237
238 #pragma mark - 238 #pragma mark -
239 239
240 // TODO(stuartmorgan): Convert most of this to private helpers in 240 // TODO(stuartmorgan): Convert most of this to private helpers in
241 // MacKeychainPasswordFormAdapter once it has sufficient higher-level public 241 // MacKeychainPasswordFormAdapter once it has sufficient higher-level public
242 // methods to provide test coverage. 242 // methods to provide test coverage.
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 std::vector<std::unique_ptr<PasswordForm>> forms_with_keychain_entry; 1378 std::vector<std::unique_ptr<PasswordForm>> forms_with_keychain_entry;
1379 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, 1379 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms,
1380 &forms_with_keychain_entry); 1380 &forms_with_keychain_entry);
1381 1381
1382 // Clean up any orphaned database entries. 1382 // Clean up any orphaned database entries.
1383 RemoveDatabaseForms(&database_forms); 1383 RemoveDatabaseForms(&database_forms);
1384 1384
1385 // Move the orphaned DB forms to the output parameter. 1385 // Move the orphaned DB forms to the output parameter.
1386 AppendSecondToFirst(orphaned_forms, &database_forms); 1386 AppendSecondToFirst(orphaned_forms, &database_forms);
1387 } 1387 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698