Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2489)

Unified Diff: chrome/browser/ui/autofill/chrome_autofill_client.cc

Issue 2660293002: Show Page Info from Form-Not-Secure 'Learn more' link (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fe2de728f05766d5440b043ba366c0bf4293ce4b 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,21 @@ void ChromeAutofillClient::StartSigninFlow() {
}
void ChromeAutofillClient::ShowHttpNotSecureExplanation() {
+#if !defined(OS_ANDROID)
+ // On desktop platforms, open Page Info, which briefly explains the HTTP
+ // 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()))
+ return;
+// Otherwise fall through to the section below that opens the URL directly.
+#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,
« no previous file with comments | « chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698