Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Side by Side Diff: chrome/browser/ui/webui/options/password_manager_handler.h

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 #include "base/prefs/pref_member.h" 12 #include "base/prefs/pref_member.h"
13 #include "chrome/browser/password_manager/password_store.h" 13 #include "chrome/browser/password_manager/password_store.h"
14 #include "chrome/browser/password_manager/password_store_consumer.h" 14 #include "chrome/browser/password_manager/password_store_consumer.h"
15 #include "chrome/browser/ui/webui/options/options_ui.h" 15 #include "chrome/browser/ui/webui/options/options_ui.h"
16 16
17 namespace content { 17 namespace autofill {
18 struct PasswordForm; 18 struct PasswordForm;
19 } 19 }
20 20
21 namespace options { 21 namespace options {
22 22
23 class PasswordManagerHandler : public OptionsPageUIHandler, 23 class PasswordManagerHandler : public OptionsPageUIHandler,
24 public PasswordStore::Observer { 24 public PasswordStore::Observer {
25 public: 25 public:
26 PasswordManagerHandler(); 26 PasswordManagerHandler();
27 virtual ~PasswordManagerHandler(); 27 virtual ~PasswordManagerHandler();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 class PasswordListPopulater : public ListPopulater { 82 class PasswordListPopulater : public ListPopulater {
83 public: 83 public:
84 explicit PasswordListPopulater(PasswordManagerHandler* page); 84 explicit PasswordListPopulater(PasswordManagerHandler* page);
85 85
86 // Send a query to the password store to populate a password list. 86 // Send a query to the password store to populate a password list.
87 virtual void Populate() OVERRIDE; 87 virtual void Populate() OVERRIDE;
88 88
89 // Send the password store's reply back to the handler. 89 // Send the password store's reply back to the handler.
90 virtual void OnPasswordStoreRequestDone( 90 virtual void OnPasswordStoreRequestDone(
91 CancelableRequestProvider::Handle handle, 91 CancelableRequestProvider::Handle handle,
92 const std::vector<content::PasswordForm*>& result) OVERRIDE; 92 const std::vector<autofill::PasswordForm*>& result) OVERRIDE;
93 virtual void OnGetPasswordStoreResults( 93 virtual void OnGetPasswordStoreResults(
94 const std::vector<content::PasswordForm*>& results) OVERRIDE; 94 const std::vector<autofill::PasswordForm*>& results) OVERRIDE;
95 }; 95 };
96 96
97 // A short class to mediate requests to the password store for exceptions. 97 // A short class to mediate requests to the password store for exceptions.
98 class PasswordExceptionListPopulater : public ListPopulater { 98 class PasswordExceptionListPopulater : public ListPopulater {
99 public: 99 public:
100 explicit PasswordExceptionListPopulater(PasswordManagerHandler* page); 100 explicit PasswordExceptionListPopulater(PasswordManagerHandler* page);
101 101
102 // Send a query to the password store to populate a passwordException list. 102 // Send a query to the password store to populate a passwordException list.
103 virtual void Populate() OVERRIDE; 103 virtual void Populate() OVERRIDE;
104 104
105 // Send the password store's reply back to the handler. 105 // Send the password store's reply back to the handler.
106 virtual void OnPasswordStoreRequestDone( 106 virtual void OnPasswordStoreRequestDone(
107 CancelableRequestProvider::Handle handle, 107 CancelableRequestProvider::Handle handle,
108 const std::vector<content::PasswordForm*>& result) OVERRIDE; 108 const std::vector<autofill::PasswordForm*>& result) OVERRIDE;
109 virtual void OnGetPasswordStoreResults( 109 virtual void OnGetPasswordStoreResults(
110 const std::vector<content::PasswordForm*>& results) OVERRIDE; 110 const std::vector<autofill::PasswordForm*>& results) OVERRIDE;
111 }; 111 };
112 112
113 // Password store consumer for populating the password list and exceptions. 113 // Password store consumer for populating the password list and exceptions.
114 PasswordListPopulater populater_; 114 PasswordListPopulater populater_;
115 PasswordExceptionListPopulater exception_populater_; 115 PasswordExceptionListPopulater exception_populater_;
116 116
117 ScopedVector<content::PasswordForm> password_list_; 117 ScopedVector<autofill::PasswordForm> password_list_;
118 ScopedVector<content::PasswordForm> password_exception_list_; 118 ScopedVector<autofill::PasswordForm> password_exception_list_;
119 119
120 // User's pref 120 // User's pref
121 std::string languages_; 121 std::string languages_;
122 122
123 // Whether to show stored passwords or not. 123 // Whether to show stored passwords or not.
124 BooleanPrefMember show_passwords_; 124 BooleanPrefMember show_passwords_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(PasswordManagerHandler); 126 DISALLOW_COPY_AND_ASSIGN(PasswordManagerHandler);
127 }; 127 };
128 128
129 } // namespace options 129 } // namespace options
130 130
131 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ 131 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698