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/options2/password_manager_handler.h" | 5 #include "chrome/browser/ui/webui/options2/password_manager_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/password_manager/password_store_factory.h" | 11 #include "chrome/browser/password_manager/password_store_factory.h" |
12 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/common/chrome_notification_types.h" | 14 #include "chrome/common/chrome_notification_types.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
17 #include "content/public/browser/notification_details.h" | 17 #include "content/public/browser/notification_details.h" |
18 #include "content/public/browser/notification_source.h" | 18 #include "content/public/browser/notification_source.h" |
19 #include "content/public/browser/web_ui.h" | 19 #include "content/public/browser/web_ui.h" |
20 #include "grit/chromium_strings.h" | 20 #include "grit/chromium_strings.h" |
21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
22 #include "net/base/net_util.h" | 22 #include "net/base/net_util.h" |
23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
24 #include "webkit/forms/password_form.h" | 24 #include "webkit/forms/password_form.h" |
25 | 25 |
26 namespace options2 { | 26 namespace options { |
27 | 27 |
28 PasswordManagerHandler::PasswordManagerHandler() | 28 PasswordManagerHandler::PasswordManagerHandler() |
29 : ALLOW_THIS_IN_INITIALIZER_LIST(populater_(this)), | 29 : ALLOW_THIS_IN_INITIALIZER_LIST(populater_(this)), |
30 ALLOW_THIS_IN_INITIALIZER_LIST(exception_populater_(this)) { | 30 ALLOW_THIS_IN_INITIALIZER_LIST(exception_populater_(this)) { |
31 } | 31 } |
32 | 32 |
33 PasswordManagerHandler::~PasswordManagerHandler() { | 33 PasswordManagerHandler::~PasswordManagerHandler() { |
34 PasswordStore* store = GetPasswordStore(); | 34 PasswordStore* store = GetPasswordStore(); |
35 if (store) | 35 if (store) |
36 store->RemoveObserver(this); | 36 store->RemoveObserver(this); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 CancelableRequestProvider::Handle handle, | 272 CancelableRequestProvider::Handle handle, |
273 const std::vector<webkit::forms::PasswordForm*>& result) { | 273 const std::vector<webkit::forms::PasswordForm*>& result) { |
274 DCHECK_EQ(pending_login_query_, handle); | 274 DCHECK_EQ(pending_login_query_, handle); |
275 pending_login_query_ = 0; | 275 pending_login_query_ = 0; |
276 page_->password_exception_list_.clear(); | 276 page_->password_exception_list_.clear(); |
277 page_->password_exception_list_.insert(page_->password_exception_list_.end(), | 277 page_->password_exception_list_.insert(page_->password_exception_list_.end(), |
278 result.begin(), result.end()); | 278 result.begin(), result.end()); |
279 page_->SetPasswordExceptionList(); | 279 page_->SetPasswordExceptionList(); |
280 } | 280 } |
281 | 281 |
282 } // namespace options2 | 282 } // namespace options |
OLD | NEW |