Chromium Code Reviews| Index: chrome/browser/ui/autofill/chrome_autofill_client.cc |
| diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| index 6b85038c7ef3f6ec306378270330550825c2d9fc..c1b511e45c5594b39c9624db21b301cbf11f9b6b 100644 |
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| @@ -62,6 +62,7 @@ |
| #include "content/public/browser/android/content_view_core.h" |
| #else // !OS_ANDROID |
| #include "chrome/browser/ui/browser.h" |
| +#include "chrome/browser/ui/browser_commands.h" |
| #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
| #include "components/zoom/zoom_controller.h" |
| #endif |
| @@ -70,13 +71,6 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::ChromeAutofillClient); |
| namespace autofill { |
| -namespace { |
| - |
| -const char kSecurityIndicatorHelpCenterUrl[] = |
| - "https://support.google.com/chrome/answer/95617"; |
| - |
| -} // anonymous namespace |
| - |
| ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) |
| : content::WebContentsObserver(web_contents), |
| unmask_controller_( |
| @@ -395,6 +389,22 @@ void ChromeAutofillClient::StartSigninFlow() { |
| } |
| void ChromeAutofillClient::ShowHttpNotSecureExplanation() { |
| +#if !defined(OS_ANDROID) |
| + // On desktop platform, open Page Info, which briefly explains the HTTP |
|
msw
2017/01/25 20:22:40
nit: 'platforms'
estark
2017/01/26 18:41:58
Done.
|
| + // warning message and provides a link to the Help Center for more details. |
| + Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); |
| + if (browser && chrome::ShowWebsiteSettings(browser, web_contents())) { |
|
msw
2017/01/25 20:22:40
nit: curlies not needed
estark
2017/01/26 18:41:58
Done.
|
| + return; |
| + } |
| +// Otherwise fall through to the section below that opens the URL directly. |
|
msw
2017/01/25 20:22:40
optional nit: this comment seems unnecessary
elawrence
2017/01/26 01:14:58
I like this comment here, since it's rather easy t
estark
2017/01/26 18:41:58
Acknowledged, decided to keep. Per Eric's comment
|
| +#endif |
| + |
| + // On Android, where Page Info does not (yet) contain a link to the Help |
| + // Center (https://crbug.com/679532), or in corner cases where Page Info is |
| + // not shown (for example, no navigation entry), just launch the Help topic |
| + // directly. |
| + const GURL kSecurityIndicatorHelpCenterUrl( |
| + "https://support.google.com/chrome/?p=ui_security_indicator"); |
| web_contents()->OpenURL(content::OpenURLParams( |
| GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), |
| WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, |