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 "chrome/browser/autofill/autofill_manager.h" | 9 #include "chrome/browser/autofill/autofill_manager.h" |
10 #include "chrome/browser/infobars/infobar_tab_helper.h" | 10 #include "chrome/browser/infobars/infobar_tab_helper.h" |
11 #include "chrome/browser/password_manager/password_form_manager.h" | 11 #include "chrome/browser/password_manager/password_form_manager.h" |
12 #include "chrome/browser/password_manager/password_manager.h" | 12 #include "chrome/browser/password_manager/password_manager.h" |
13 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | 13 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
14 #include "chrome/browser/ui/sync/one_click_signin_helper.h" | 14 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
15 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 15 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
16 #include "chrome/common/autofill_messages.h" | 16 #include "chrome/common/autofill_messages.h" |
17 #include "chrome/common/net/gaia/gaia_urls.h" | 17 #include "chrome/common/net/gaia/gaia_urls.h" |
18 #include "content/public/browser/navigation_entry.h" | 18 #include "content/public/browser/navigation_entry.h" |
19 #include "content/public/browser/render_view_host.h" | 19 #include "content/public/browser/render_view_host.h" |
20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
21 #include "content/public/common/ssl_status.h" | 21 #include "content/public/common/ssl_status.h" |
22 #include "grit/chromium_strings.h" | 22 #include "grit/chromium_strings.h" |
23 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
24 #include "grit/theme_resources_standard.h" | 24 #include "grit/theme_resources.h" |
25 #include "net/base/cert_status_flags.h" | 25 #include "net/base/cert_status_flags.h" |
26 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
27 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
28 #include "webkit/forms/password_form.h" | 28 #include "webkit/forms/password_form.h" |
29 | 29 |
30 // After a successful *new* login attempt, we take the PasswordFormManager in | 30 // After a successful *new* login attempt, we take the PasswordFormManager in |
31 // provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while | 31 // provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while |
32 // the user makes up their mind with the "save password" infobar. Note if the | 32 // the user makes up their mind with the "save password" infobar. Note if the |
33 // login is one we already know about, the end of the line is | 33 // login is one we already know about, the end of the line is |
34 // provisional_save_manager_ because we just update it on success and so such | 34 // provisional_save_manager_ because we just update it on success and so such |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() { | 157 bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() { |
158 content::NavigationEntry* entry = | 158 content::NavigationEntry* entry = |
159 tab_contents_->web_contents()->GetController().GetActiveEntry(); | 159 tab_contents_->web_contents()->GetController().GetActiveEntry(); |
160 if (!entry) { | 160 if (!entry) { |
161 NOTREACHED(); | 161 NOTREACHED(); |
162 return false; | 162 return false; |
163 } | 163 } |
164 | 164 |
165 return net::IsCertStatusError(entry->GetSSL().cert_status); | 165 return net::IsCertStatusError(entry->GetSSL().cert_status); |
166 } | 166 } |
OLD | NEW |