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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.h

Issue 276583003: Password bubble: Deal correctly with blacklist state changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_ui_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
7 7
8 #include "base/memory/scoped_vector.h"
9 #include "components/autofill/core/common/password_form.h"
8 #include "components/password_manager/core/browser/password_form_manager.h" 10 #include "components/password_manager/core/browser/password_form_manager.h"
9 #include "components/password_manager/core/browser/password_store.h" 11 #include "components/password_manager/core/browser/password_store.h"
10 #include "components/password_manager/core/browser/password_store_change.h" 12 #include "components/password_manager/core/browser/password_store_change.h"
11 #include "components/password_manager/core/common/password_manager_ui.h" 13 #include "components/password_manager/core/common/password_manager_ui.h"
12 #include "content/public/browser/navigation_details.h" 14 #include "content/public/browser/navigation_details.h"
13 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
14 #include "content/public/browser/web_contents_user_data.h" 16 #include "content/public/browser/web_contents_user_data.h"
15 17
16 namespace content { 18 namespace content {
17 class WebContents; 19 class WebContents;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 protected: 90 protected:
89 explicit ManagePasswordsUIController( 91 explicit ManagePasswordsUIController(
90 content::WebContents* web_contents); 92 content::WebContents* web_contents);
91 93
92 // All previously stored credentials for a specific site. Set by 94 // All previously stored credentials for a specific site. Set by
93 // OnPasswordSubmitted(), OnPasswordAutofilled(), or 95 // OnPasswordSubmitted(), OnPasswordAutofilled(), or
94 // OnBlacklistBlockedAutofill(). Protected, not private, so we can mess with 96 // OnBlacklistBlockedAutofill(). Protected, not private, so we can mess with
95 // the value in ManagePasswordsUIControllerMock. 97 // the value in ManagePasswordsUIControllerMock.
96 autofill::PasswordFormMap password_form_map_; 98 autofill::PasswordFormMap password_form_map_;
97 99
100 // We create copies of PasswordForm objects that come in via OnLoginsChanged()
101 // and store them in this vector as well as in |password_form_map_| to ensure
102 // that we destroy them correctly.
103 ScopedVector<autofill::PasswordForm> new_password_forms_;
104
98 // The current state of the password manager. Protected so we can manipulate 105 // The current state of the password manager. Protected so we can manipulate
99 // the value in tests. 106 // the value in tests.
100 password_manager::ui::State state_; 107 password_manager::ui::State state_;
101 108
102 private: 109 private:
103 friend class content::WebContentsUserData<ManagePasswordsUIController>; 110 friend class content::WebContentsUserData<ManagePasswordsUIController>;
104 111
105 // Shows the password bubble without user interaction. The controller MUST 112 // Shows the password bubble without user interaction. The controller MUST
106 // be in PENDING_PASSWORD_AND_BUBBLE_STATE. 113 // be in PENDING_PASSWORD_AND_BUBBLE_STATE.
107 void ShowBubbleWithoutUserInteraction(); 114 void ShowBubbleWithoutUserInteraction();
(...skipping 21 matching lines...) Expand all
129 136
130 // The origin of the form we're currently dealing with; we'll use this to 137 // The origin of the form we're currently dealing with; we'll use this to
131 // determine which PasswordStore changes we should care about when updating 138 // determine which PasswordStore changes we should care about when updating
132 // |password_form_map_|. 139 // |password_form_map_|.
133 GURL origin_; 140 GURL origin_;
134 141
135 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); 142 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController);
136 }; 143 };
137 144
138 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 145 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_ui_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698