Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" | 5 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/timer/elapsed_timer.h" | 10 #include "base/timer/elapsed_timer.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 | 208 |
| 209 PasswordManagerDelegateImpl::PasswordManagerDelegateImpl( | 209 PasswordManagerDelegateImpl::PasswordManagerDelegateImpl( |
| 210 content::WebContents* web_contents) | 210 content::WebContents* web_contents) |
| 211 : web_contents_(web_contents), | 211 : web_contents_(web_contents), |
| 212 driver_(web_contents) { | 212 driver_(web_contents) { |
| 213 } | 213 } |
| 214 | 214 |
| 215 PasswordManagerDelegateImpl::~PasswordManagerDelegateImpl() { | 215 PasswordManagerDelegateImpl::~PasswordManagerDelegateImpl() { |
| 216 } | 216 } |
| 217 | 217 |
| 218 void PasswordManagerDelegateImpl::FillPasswordForm( | |
| 219 const autofill::PasswordFormFillData& form_data) { | |
| 220 driver_.FillPasswordForm(form_data); | |
| 221 } | |
| 222 | |
| 223 void PasswordManagerDelegateImpl::AddSavePasswordInfoBarIfPermitted( | 218 void PasswordManagerDelegateImpl::AddSavePasswordInfoBarIfPermitted( |
| 224 PasswordFormManager* form_to_save) { | 219 PasswordFormManager* form_to_save) { |
| 225 std::string uma_histogram_suffix( | 220 std::string uma_histogram_suffix( |
| 226 password_manager_metrics_util::GroupIdToString( | 221 password_manager_metrics_util::GroupIdToString( |
| 227 password_manager_metrics_util::MonitoredDomainGroupId( | 222 password_manager_metrics_util::MonitoredDomainGroupId( |
| 228 form_to_save->realm(), GetProfile()->GetPrefs()))); | 223 form_to_save->realm(), GetProfile()->GetPrefs()))); |
| 229 SavePasswordInfoBarDelegate::Create( | 224 SavePasswordInfoBarDelegate::Create( |
| 230 web_contents_, form_to_save, uma_histogram_suffix); | 225 web_contents_, form_to_save, uma_histogram_suffix); |
| 231 } | 226 } |
| 232 | 227 |
| 233 Profile* PasswordManagerDelegateImpl::GetProfile() { | 228 Profile* PasswordManagerDelegateImpl::GetProfile() { |
| 234 return Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 229 return Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
| 235 } | 230 } |
| 236 | 231 |
| 237 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() { | 232 PasswordManagerDriver* PasswordManagerDelegateImpl::GetDriver() { |
| 238 return driver_.DidLastPageLoadEncounterSSLErrors(); | 233 return &driver_; |
|
Patrick Dubroy
2014/02/03 13:15:08
Any reason not to inline this in the header?
blundell
2014/02/03 14:37:59
Chromium style doesn't allow inlining virtual meth
| |
| 239 } | 234 } |
| OLD | NEW |