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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 const base::ListValue* args) { | 177 const base::ListValue* args) { |
178 int index; | 178 int index; |
179 if (!ExtractIntegerValue(args, &index)) | 179 if (!ExtractIntegerValue(args, &index)) |
180 NOTREACHED(); | 180 NOTREACHED(); |
181 | 181 |
182 password_manager_presenter_.RequestShowPassword(static_cast<size_t>(index)); | 182 password_manager_presenter_.RequestShowPassword(static_cast<size_t>(index)); |
183 } | 183 } |
184 | 184 |
185 void PasswordManagerHandler::ShowPassword( | 185 void PasswordManagerHandler::ShowPassword( |
186 size_t index, | 186 size_t index, |
| 187 const std::string& origin_url, |
| 188 const std::string& username, |
187 const base::string16& password_value) { | 189 const base::string16& password_value) { |
188 // Call back the front end to reveal the password. | 190 // Call back the front end to reveal the password. |
189 web_ui()->CallJavascriptFunction( | 191 web_ui()->CallJavascriptFunction( |
190 "PasswordManager.showPassword", | 192 "PasswordManager.showPassword", |
191 base::FundamentalValue(static_cast<int>(index)), | 193 base::FundamentalValue(static_cast<int>(index)), |
192 base::StringValue(password_value)); | 194 base::StringValue(password_value)); |
193 } | 195 } |
194 | 196 |
195 void PasswordManagerHandler::HandleUpdatePasswordLists( | 197 void PasswordManagerHandler::HandleUpdatePasswordLists( |
196 const base::ListValue* args) { | 198 const base::ListValue* args) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 for (size_t i = 0; i < password_exception_list.size(); ++i) { | 236 for (size_t i = 0; i < password_exception_list.size(); ++i) { |
235 entries.AppendString(password_manager::GetHumanReadableOrigin( | 237 entries.AppendString(password_manager::GetHumanReadableOrigin( |
236 *password_exception_list[i], languages_)); | 238 *password_exception_list[i], languages_)); |
237 } | 239 } |
238 | 240 |
239 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", | 241 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", |
240 entries); | 242 entries); |
241 } | 243 } |
242 | 244 |
243 } // namespace options | 245 } // namespace options |
OLD | NEW |