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

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

Issue 6770012: Handle the PasswordManagerAllowShowPasswords preference in the options webui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep password column, show "IT-admin" banner Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/password_manager/password_store.h" 12 #include "chrome/browser/password_manager/password_store.h"
13 #include "chrome/browser/password_manager/password_store_consumer.h" 13 #include "chrome/browser/password_manager/password_store_consumer.h"
14 #include "chrome/browser/prefs/pref_member.h"
14 #include "chrome/browser/ui/webui/options/options_ui.h" 15 #include "chrome/browser/ui/webui/options/options_ui.h"
15 16
16 class PasswordManagerHandler : public OptionsPageUIHandler, 17 class PasswordManagerHandler : public OptionsPageUIHandler,
17 public PasswordStore::Observer { 18 public PasswordStore::Observer {
18 public: 19 public:
19 PasswordManagerHandler(); 20 PasswordManagerHandler();
20 virtual ~PasswordManagerHandler(); 21 virtual ~PasswordManagerHandler();
21 22
22 // OptionsPageUIHandler implementation. 23 // OptionsPageUIHandler implementation.
23 virtual void GetLocalizedValues(DictionaryValue* localized_strings); 24 virtual void GetLocalizedValues(DictionaryValue* localized_strings);
24 virtual void Initialize(); 25 virtual void Initialize();
25 virtual void RegisterMessages(); 26 virtual void RegisterMessages();
26 27
27 // PasswordStore::Observer implementation. 28 // PasswordStore::Observer implementation.
28 virtual void OnLoginsChanged(); 29 virtual void OnLoginsChanged();
29 30
31 // NotificationObserver implementation.
32 virtual void Observe(NotificationType type,
33 const NotificationSource& source,
34 const NotificationDetails& details);
35
30 private: 36 private:
31 // The password store associated with the currently active profile. 37 // The password store associated with the currently active profile.
32 PasswordStore* GetPasswordStore(); 38 PasswordStore* GetPasswordStore();
33 39
34 // Called when the JS PasswordManager object is initialized. 40 // Called when the JS PasswordManager object is initialized.
35 void UpdatePasswordLists(const ListValue* args); 41 void UpdatePasswordLists(const ListValue* args);
36 42
37 // Remove an entry. 43 // Remove an entry.
38 // @param value the entry index to be removed. 44 // @param value the entry index to be removed.
39 void RemoveSavedPassword(const ListValue* args); 45 void RemoveSavedPassword(const ListValue* args);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Password store consumer for populating the password list and exceptions. 113 // Password store consumer for populating the password list and exceptions.
108 PasswordListPopulater populater_; 114 PasswordListPopulater populater_;
109 PasswordExceptionListPopulater exception_populater_; 115 PasswordExceptionListPopulater exception_populater_;
110 116
111 ScopedVector<webkit_glue::PasswordForm> password_list_; 117 ScopedVector<webkit_glue::PasswordForm> password_list_;
112 ScopedVector<webkit_glue::PasswordForm> password_exception_list_; 118 ScopedVector<webkit_glue::PasswordForm> password_exception_list_;
113 119
114 // User's pref 120 // User's pref
115 std::string languages_; 121 std::string languages_;
116 122
123 // Whether to show stored passwords or not.
124 BooleanPrefMember show_passwords_;
125
117 DISALLOW_COPY_AND_ASSIGN(PasswordManagerHandler); 126 DISALLOW_COPY_AND_ASSIGN(PasswordManagerHandler);
118 }; 127 };
119 128
120 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ 129 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698