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

Side by Side Diff: components/autofill/content/renderer/password_autofill_agent.cc

Issue 258473005: Add a unittest for PasswordAutofillAgent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "components/autofill/content/renderer/password_autofill_agent.h" 5 #include "components/autofill/content/renderer/password_autofill_agent.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 } // namespace 220 } // namespace
221 221
222 //////////////////////////////////////////////////////////////////////////////// 222 ////////////////////////////////////////////////////////////////////////////////
223 // PasswordAutofillAgent, public: 223 // PasswordAutofillAgent, public:
224 224
225 PasswordAutofillAgent::PasswordAutofillAgent(content::RenderView* render_view) 225 PasswordAutofillAgent::PasswordAutofillAgent(content::RenderView* render_view)
226 : content::RenderViewObserver(render_view), 226 : content::RenderViewObserver(render_view),
227 usernames_usage_(NOTHING_TO_AUTOFILL), 227 usernames_usage_(NOTHING_TO_AUTOFILL),
228 web_view_(render_view->GetWebView()), 228 web_view_(render_view ? render_view->GetWebView() : NULL),
229 logging_state_active_(false), 229 logging_state_active_(false),
230 weak_ptr_factory_(this) { 230 weak_ptr_factory_(this) {
231 } 231 }
232 232
233 PasswordAutofillAgent::~PasswordAutofillAgent() { 233 PasswordAutofillAgent::~PasswordAutofillAgent() {
234 } 234 }
235 235
236 PasswordAutofillAgent::PasswordValueGatekeeper::PasswordValueGatekeeper() 236 PasswordAutofillAgent::PasswordValueGatekeeper::PasswordValueGatekeeper()
237 : was_user_gesture_seen_(false) { 237 : was_user_gesture_seen_(false) {
238 } 238 }
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(input); 1009 LoginToPasswordInfoMap::iterator iter = login_to_password_info_.find(input);
1010 if (iter == login_to_password_info_.end()) 1010 if (iter == login_to_password_info_.end())
1011 return false; 1011 return false;
1012 1012
1013 *found_input = input; 1013 *found_input = input;
1014 *found_password = iter->second; 1014 *found_password = iter->second;
1015 return true; 1015 return true;
1016 } 1016 }
1017 1017
1018 } // namespace autofill 1018 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698