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

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

Issue 441643007: ManagePasswordsUIController should make a deep copy of values which it doesn't own. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 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/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/timer/elapsed_timer.h" 10 #include "base/timer/elapsed_timer.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual void NeverSavePasswordInternal(); 110 virtual void NeverSavePasswordInternal();
111 111
112 // content::WebContentsObserver: 112 // content::WebContentsObserver:
113 virtual void DidNavigateMainFrame( 113 virtual void DidNavigateMainFrame(
114 const content::LoadCommittedDetails& details, 114 const content::LoadCommittedDetails& details,
115 const content::FrameNavigateParams& params) OVERRIDE; 115 const content::FrameNavigateParams& params) OVERRIDE;
116 116
117 // All previously stored credentials for a specific site. 117 // All previously stored credentials for a specific site.
118 // Protected, not private, so we can mess with the value in 118 // Protected, not private, so we can mess with the value in
119 // ManagePasswordsUIControllerMock. 119 // ManagePasswordsUIControllerMock.
120 autofill::ConstPasswordFormMap password_form_map_; 120 autofill::ConstPasswordFormMap password_form_map_;
vabr (Chromium) 2014/08/04 15:36:56 This declaration order means, that new_password_fo
vasilii 2014/08/04 16:20:59 Done.
121 121
122 // We create copies of PasswordForm objects that come in via OnLoginsChanged() 122 // We create copies of PasswordForm objects that come in with unclear lifetime
123 // and store them in this vector as well as in |password_form_map_| to ensure 123 // and store them in this vector as well as in |password_form_map_| to ensure
124 // that we destroy them correctly. 124 // that we destroy them correctly.
125 ScopedVector<autofill::PasswordForm> new_password_forms_; 125 ScopedVector<autofill::PasswordForm> new_password_forms_;
126 126
127 // The current state of the password manager. Protected so we can manipulate 127 // The current state of the password manager. Protected so we can manipulate
128 // the value in tests. 128 // the value in tests.
129 password_manager::ui::State state_; 129 password_manager::ui::State state_;
130 130
131 // Used to measure the amount of time on a page; if it's less than some 131 // Used to measure the amount of time on a page; if it's less than some
132 // reasonable limit, then don't close the bubble upon navigation. We create 132 // reasonable limit, then don't close the bubble upon navigation. We create
(...skipping 27 matching lines...) Expand all
160 160
161 // The origin of the form we're currently dealing with; we'll use this to 161 // The origin of the form we're currently dealing with; we'll use this to
162 // determine which PasswordStore changes we should care about when updating 162 // determine which PasswordStore changes we should care about when updating
163 // |password_form_map_|. 163 // |password_form_map_|.
164 GURL origin_; 164 GURL origin_;
165 165
166 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); 166 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController);
167 }; 167 };
168 168
169 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 169 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698