Chromium Code Reviews
Help | Chromium Project | Sign in
(114)

Side by Side Diff: chrome/browser/password_manager/password_manager.h

Issue 11361142: Fill passwords if password manager is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lint warnings. Created 1 year, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
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_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const std::vector<content::PasswordForm>& visible_forms); 77 const std::vector<content::PasswordForm>& visible_forms);
78 78
79 protected: 79 protected:
80 // Subclassed for unit tests. 80 // Subclassed for unit tests.
81 PasswordManager(content::WebContents* web_contents, 81 PasswordManager(content::WebContents* web_contents,
82 PasswordManagerDelegate* delegate); 82 PasswordManagerDelegate* delegate);
83 83
84 private: 84 private:
85 friend class content::WebContentsUserData<PasswordManager>; 85 friend class content::WebContentsUserData<PasswordManager>;
86 86
87 // Is password autofill enabled for the current profile?
88 bool IsFillingEnabled() const;
89
90 // Note about how a PasswordFormManager can transition from 87 // Note about how a PasswordFormManager can transition from
91 // pending_login_managers_ to provisional_save_manager_ and the infobar. 88 // pending_login_managers_ to provisional_save_manager_ and the infobar.
92 // 89 //
93 // 1. form "seen" 90 // 1. form "seen"
94 // | new 91 // | new
95 // | ___ Infobar 92 // | ___ Infobar
96 // pending_login -- form submit --> provisional_save ___/ 93 // pending_login -- form submit --> provisional_save ___/
97 // ^ | \___ (update DB) 94 // ^ | \___ (update DB)
98 // | fail 95 // | fail
99 // |-----------<------<---------| !new 96 // |-----------<------<---------| !new
(...skipping 11 matching lines...) Expand all
111 // time a user submits a login form and gets to the next page. 108 // time a user submits a login form and gets to the next page.
112 scoped_ptr<PasswordFormManager> provisional_save_manager_; 109 scoped_ptr<PasswordFormManager> provisional_save_manager_;
113 110
114 // Our delegate for carrying out external operations. This is typically the 111 // Our delegate for carrying out external operations. This is typically the
115 // containing WebContents. 112 // containing WebContents.
116 PasswordManagerDelegate* const delegate_; 113 PasswordManagerDelegate* const delegate_;
117 114
118 // The LoginModelObserver (i.e LoginView) requiring autofill. 115 // The LoginModelObserver (i.e LoginView) requiring autofill.
119 LoginModelObserver* observer_; 116 LoginModelObserver* observer_;
120 117
121 // Set to false to disable the password manager (will no longer fill 118 // Set to false to disable the password manager (will no longer ask if you
122 // passwords or ask you if you want to save passwords). 119 // want to save passwords but continue to fill passwords).
Ilya Sherman 2012/11/08 06:11:26 nit: I think this would be slightly clearer if the
ttr314 2012/11/08 13:36:06 Done.
123 BooleanPrefMember password_manager_enabled_; 120 BooleanPrefMember password_manager_enabled_;
124 121
125 DISALLOW_COPY_AND_ASSIGN(PasswordManager); 122 DISALLOW_COPY_AND_ASSIGN(PasswordManager);
126 }; 123 };
127 124
128 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ 125 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6