| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 form->original_signon_realm = form->signon_realm; | 199 form->original_signon_realm = form->signon_realm; |
| 200 form->signon_realm = lookup_form->signon_realm; | 200 form->signon_realm = lookup_form->signon_realm; |
| 201 form->origin = lookup_form->origin; | 201 form->origin = lookup_form->origin; |
| 202 form->action = lookup_form->action; | 202 form->action = lookup_form->action; |
| 203 } | 203 } |
| 204 if (data->secret) { | 204 if (data->secret) { |
| 205 form->password_value = UTF8ToUTF16(data->secret); | 205 form->password_value = UTF8ToUTF16(data->secret); |
| 206 } else { | 206 } else { |
| 207 LOG(WARNING) << "Unable to access password from list element!"; | 207 LOG(WARNING) << "Unable to access password from list element!"; |
| 208 } | 208 } |
| 209 forms.push_back(form.release()); | 209 forms.push_back(form.Pass()); |
| 210 } else { | 210 } else { |
| 211 LOG(WARNING) << "Could not initialize PasswordForm from attributes!"; | 211 LOG(WARNING) << "Could not initialize PasswordForm from attributes!"; |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 if (lookup_form) { | 214 if (lookup_form) { |
| 215 const GURL signon_realm(lookup_form->signon_realm); | 215 const GURL signon_realm(lookup_form->signon_realm); |
| 216 std::string registered_domain = | 216 std::string registered_domain = |
| 217 password_manager::GetRegistryControlledDomain(signon_realm); | 217 password_manager::GetRegistryControlledDomain(signon_realm); |
| 218 UMA_HISTOGRAM_ENUMERATION( | 218 UMA_HISTOGRAM_ENUMERATION( |
| 219 "PasswordManager.PslDomainMatchTriggering", | 219 "PasswordManager.PslDomainMatchTriggering", |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 for (size_t i = 0; i < forms.size(); ++i) { | 803 for (size_t i = 0; i < forms.size(); ++i) { |
| 804 if (RemoveLogin(*forms[i])) { | 804 if (RemoveLogin(*forms[i])) { |
| 805 changes->push_back(password_manager::PasswordStoreChange( | 805 changes->push_back(password_manager::PasswordStoreChange( |
| 806 password_manager::PasswordStoreChange::REMOVE, *forms[i])); | 806 password_manager::PasswordStoreChange::REMOVE, *forms[i])); |
| 807 } else { | 807 } else { |
| 808 ok = false; | 808 ok = false; |
| 809 } | 809 } |
| 810 } | 810 } |
| 811 return ok; | 811 return ok; |
| 812 } | 812 } |
| OLD | NEW |