OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |