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

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

Issue 2650033004: Show Page Info from Form-Not-Secure 'Learn more' link (Closed)
Patch Set: rebase 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 f34d661a746935718ebb98f505b13df0a0c2fc5b..613753281d8638884e2b1fc25b14c55d6e0b3f02 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -61,6 +61,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
@@ -69,13 +70,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_(
@@ -384,6 +378,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