OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 web_ui()->CallJavascriptFunction("PasswordManager.setSavedPasswordsList", | 214 web_ui()->CallJavascriptFunction("PasswordManager.setSavedPasswordsList", |
215 entries); | 215 entries); |
216 } | 216 } |
217 | 217 |
218 void PasswordManagerHandler::SetPasswordExceptionList( | 218 void PasswordManagerHandler::SetPasswordExceptionList( |
219 const ScopedVector<autofill::PasswordForm>& password_exception_list) { | 219 const ScopedVector<autofill::PasswordForm>& password_exception_list) { |
220 base::ListValue entries; | 220 base::ListValue entries; |
221 for (size_t i = 0; i < password_exception_list.size(); ++i) { | 221 for (size_t i = 0; i < password_exception_list.size(); ++i) { |
222 entries.Append(new base::StringValue( | 222 entries.AppendString( |
223 net::FormatUrl(password_exception_list[i]->origin, languages_))); | 223 GetHumanReadableOrigin(*password_exception_list[i], languages_)); |
224 } | 224 } |
225 | 225 |
226 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", | 226 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", |
227 entries); | 227 entries); |
228 } | 228 } |
229 | 229 |
230 } // namespace options | 230 } // namespace options |
OLD | NEW |