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..f07bceb80d116d4d9becd943f0356b4c60ae3f29 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,10 +389,25 @@ void ChromeAutofillClient::StartSigninFlow() { |
| } |
| void ChromeAutofillClient::ShowHttpNotSecureExplanation() { |
| +#if !defined(OS_ANDROID) |
| + // On desktop platform, open Page Info, which briefly explains the HTTP |
| + // warning message and provides a link to the Help Center for more details. |
| + if (chrome::ShowWebsiteSettings( |
|
Mathieu
2017/01/25 17:03:41
nit: do we need the if and return, given we are ef
estark
2017/01/25 17:23:15
Fixed the fallthrough and added comment. This is s
|
| + chrome::FindBrowserWithWebContents(web_contents()), web_contents())) { |
|
Mathieu
2017/01/25 17:03:41
nit: if seems to be good practice (at least in thi
estark
2017/01/25 17:23:15
Done.
|
| + return; |
| + } |
| +#else |
| + // 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, |
| false /* is_renderer_initiated */)); |
| +#endif |
| } |
| } // namespace autofill |