OLD | NEW |
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 #include "chrome/browser/password_manager/password_store_mac_internal.h" | 6 #include "chrome/browser/password_manager/password_store_mac_internal.h" |
7 | 7 |
8 #include <CoreServices/CoreServices.h> | 8 #include <CoreServices/CoreServices.h> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 406 } |
407 break; | 407 break; |
408 } | 408 } |
409 } | 409 } |
410 keychain.ItemFreeAttributesAndData(attrList, password_data); | 410 keychain.ItemFreeAttributesAndData(attrList, password_data); |
411 | 411 |
412 // kSecNegativeItemAttr doesn't seem to actually be in widespread use. In | 412 // kSecNegativeItemAttr doesn't seem to actually be in widespread use. In |
413 // practice, other browsers seem to use a "" or " " password (and a special | 413 // practice, other browsers seem to use a "" or " " password (and a special |
414 // user name) to indicated blacklist entries. | 414 // user name) to indicated blacklist entries. |
415 if (extract_password_data && (form->password_value.empty() || | 415 if (extract_password_data && (form->password_value.empty() || |
416 EqualsASCII(form->password_value, " "))) { | 416 base::EqualsASCII(form->password_value, " "))) { |
417 form->blacklisted_by_user = true; | 417 form->blacklisted_by_user = true; |
418 } | 418 } |
419 | 419 |
420 // Android facet URLs aren't parsed correctly by GURL and need to be handled | 420 // Android facet URLs aren't parsed correctly by GURL and need to be handled |
421 // separately. | 421 // separately. |
422 if (password_manager::IsValidAndroidFacetURI(server)) { | 422 if (password_manager::IsValidAndroidFacetURI(server)) { |
423 form->signon_realm = server; | 423 form->signon_realm = server; |
424 form->origin = GURL(); | 424 form->origin = GURL(); |
425 form->ssl_valid = true; | 425 form->ssl_valid = true; |
426 } else { | 426 } else { |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 ScopedVector<PasswordForm> forms_with_keychain_entry; | 1246 ScopedVector<PasswordForm> forms_with_keychain_entry; |
1247 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, | 1247 internal_keychain_helpers::GetPasswordsForForms(*keychain_, &database_forms, |
1248 &forms_with_keychain_entry); | 1248 &forms_with_keychain_entry); |
1249 | 1249 |
1250 // Clean up any orphaned database entries. | 1250 // Clean up any orphaned database entries. |
1251 RemoveDatabaseForms(&database_forms); | 1251 RemoveDatabaseForms(&database_forms); |
1252 | 1252 |
1253 // Move the orphaned DB forms to the output parameter. | 1253 // Move the orphaned DB forms to the output parameter. |
1254 AppendSecondToFirst(orphaned_forms, &database_forms); | 1254 AppendSecondToFirst(orphaned_forms, &database_forms); |
1255 } | 1255 } |
OLD | NEW |