| 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/ui/webui/options/password_manager_handler.h" | 5 #include "chrome/browser/ui/webui/options/password_manager_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 base::Bind(&PasswordManagerHandler::RemoveAllPasswordExceptions, | 101 base::Bind(&PasswordManagerHandler::RemoveAllPasswordExceptions, |
| 102 base::Unretained(this))); | 102 base::Unretained(this))); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void PasswordManagerHandler::OnLoginsChanged() { | 105 void PasswordManagerHandler::OnLoginsChanged() { |
| 106 UpdatePasswordLists(NULL); | 106 UpdatePasswordLists(NULL); |
| 107 } | 107 } |
| 108 | 108 |
| 109 PasswordStore* PasswordManagerHandler::GetPasswordStore() { | 109 PasswordStore* PasswordManagerHandler::GetPasswordStore() { |
| 110 return PasswordStoreFactory::GetForProfile(Profile::FromWebUI(web_ui()), | 110 return PasswordStoreFactory::GetForProfile(Profile::FromWebUI(web_ui()), |
| 111 Profile::EXPLICIT_ACCESS); | 111 Profile::EXPLICIT_ACCESS).get(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void PasswordManagerHandler::UpdatePasswordLists(const ListValue* args) { | 114 void PasswordManagerHandler::UpdatePasswordLists(const ListValue* args) { |
| 115 // Reset the current lists. | 115 // Reset the current lists. |
| 116 password_list_.clear(); | 116 password_list_.clear(); |
| 117 password_exception_list_.clear(); | 117 password_exception_list_.clear(); |
| 118 | 118 |
| 119 languages_ = Profile::FromWebUI(web_ui())->GetPrefs()-> | 119 languages_ = Profile::FromWebUI(web_ui())->GetPrefs()-> |
| 120 GetString(prefs::kAcceptLanguages); | 120 GetString(prefs::kAcceptLanguages); |
| 121 populater_.Populate(); | 121 populater_.Populate(); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 276 |
| 277 void PasswordManagerHandler::PasswordExceptionListPopulater:: | 277 void PasswordManagerHandler::PasswordExceptionListPopulater:: |
| 278 OnGetPasswordStoreResults( | 278 OnGetPasswordStoreResults( |
| 279 const std::vector<content::PasswordForm*>& results) { | 279 const std::vector<content::PasswordForm*>& results) { |
| 280 // TODO(kaiwang): Implement when I refactor | 280 // TODO(kaiwang): Implement when I refactor |
| 281 // PasswordStore::GetAutofillableLogins and PasswordStore::GetBlacklistLogins. | 281 // PasswordStore::GetAutofillableLogins and PasswordStore::GetBlacklistLogins. |
| 282 NOTIMPLEMENTED(); | 282 NOTIMPLEMENTED(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 } // namespace options | 285 } // namespace options |
| OLD | NEW |