| 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/native_backend_gnome_x.h" | 5 #include "chrome/browser/password_manager/native_backend_gnome_x.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <gnome-keyring.h> | 8 #include <gnome-keyring.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (form) { | 190 if (form) { |
| 191 if (lookup_form && form->signon_realm != lookup_form->signon_realm) { | 191 if (lookup_form && form->signon_realm != lookup_form->signon_realm) { |
| 192 // This is not an exact match, we try PSL matching. | 192 // This is not an exact match, we try PSL matching. |
| 193 if (lookup_form->scheme != PasswordForm::SCHEME_HTML || | 193 if (lookup_form->scheme != PasswordForm::SCHEME_HTML || |
| 194 form->scheme != PasswordForm::SCHEME_HTML || | 194 form->scheme != PasswordForm::SCHEME_HTML || |
| 195 !(password_manager::IsPublicSuffixDomainMatch( | 195 !(password_manager::IsPublicSuffixDomainMatch( |
| 196 lookup_form->signon_realm, form->signon_realm))) { | 196 lookup_form->signon_realm, form->signon_realm))) { |
| 197 continue; | 197 continue; |
| 198 } | 198 } |
| 199 psl_domain_match_metric = password_manager::PSL_DOMAIN_MATCH_FOUND; | 199 psl_domain_match_metric = password_manager::PSL_DOMAIN_MATCH_FOUND; |
| 200 form->original_signon_realm = form->signon_realm; | 200 form->is_public_suffix_match = true; |
| 201 form->signon_realm = lookup_form->signon_realm; | |
| 202 form->origin = lookup_form->origin; | |
| 203 form->action = lookup_form->action; | |
| 204 } | 201 } |
| 205 if (data->secret) { | 202 if (data->secret) { |
| 206 form->password_value = UTF8ToUTF16(data->secret); | 203 form->password_value = UTF8ToUTF16(data->secret); |
| 207 } else { | 204 } else { |
| 208 LOG(WARNING) << "Unable to access password from list element!"; | 205 LOG(WARNING) << "Unable to access password from list element!"; |
| 209 } | 206 } |
| 210 forms.push_back(form.Pass()); | 207 forms.push_back(form.Pass()); |
| 211 } else { | 208 } else { |
| 212 LOG(WARNING) << "Could not initialize PasswordForm from attributes!"; | 209 LOG(WARNING) << "Could not initialize PasswordForm from attributes!"; |
| 213 } | 210 } |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 ScopedVector<PasswordForm> forms; | 801 ScopedVector<PasswordForm> forms; |
| 805 if (!GetLoginsBetween(get_begin, get_end, date_to_compare, &forms)) | 802 if (!GetLoginsBetween(get_begin, get_end, date_to_compare, &forms)) |
| 806 return false; | 803 return false; |
| 807 | 804 |
| 808 for (size_t i = 0; i < forms.size(); ++i) { | 805 for (size_t i = 0; i < forms.size(); ++i) { |
| 809 if (!RemoveLogin(*forms[i], changes)) | 806 if (!RemoveLogin(*forms[i], changes)) |
| 810 return false; | 807 return false; |
| 811 } | 808 } |
| 812 return true; | 809 return true; |
| 813 } | 810 } |
| OLD | NEW |