OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/autofill/chrome_autofill_client.h" | 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 content::ContentViewCore::FromWebContents(web_contents()), | 371 content::ContentViewCore::FromWebContents(web_contents()), |
372 signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN); | 372 signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN); |
373 #endif | 373 #endif |
374 } | 374 } |
375 | 375 |
376 void ChromeAutofillClient::ShowHttpNotSecureExplanation() { | 376 void ChromeAutofillClient::ShowHttpNotSecureExplanation() { |
377 #if !defined(OS_ANDROID) | 377 #if !defined(OS_ANDROID) |
378 // On desktop platforms, open Page Info, which briefly explains the HTTP | 378 // On desktop platforms, open Page Info, which briefly explains the HTTP |
379 // warning message and provides a link to the Help Center for more details. | 379 // warning message and provides a link to the Help Center for more details. |
380 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); | 380 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); |
381 if (browser && chrome::ShowWebsiteSettings(browser, web_contents())) | 381 if (browser && chrome::ShowPageInfo(browser, web_contents())) |
382 return; | 382 return; |
383 // Otherwise fall through to the section below that opens the URL directly. | 383 // Otherwise fall through to the section below that opens the URL directly. |
384 #endif | 384 #endif |
385 | 385 |
386 // On Android, where Page Info does not (yet) contain a link to the Help | 386 // On Android, where Page Info does not (yet) contain a link to the Help |
387 // Center (https://crbug.com/679532), or in corner cases where Page Info is | 387 // Center (https://crbug.com/679532), or in corner cases where Page Info is |
388 // not shown (for example, no navigation entry), just launch the Help topic | 388 // not shown (for example, no navigation entry), just launch the Help topic |
389 // directly. | 389 // directly. |
390 const GURL kSecurityIndicatorHelpCenterUrl( | 390 const GURL kSecurityIndicatorHelpCenterUrl( |
391 "https://support.google.com/chrome/?p=ui_security_indicator"); | 391 "https://support.google.com/chrome/?p=ui_security_indicator"); |
392 web_contents()->OpenURL(content::OpenURLParams( | 392 web_contents()->OpenURL(content::OpenURLParams( |
393 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), | 393 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), |
394 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, | 394 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, |
395 false /* is_renderer_initiated */)); | 395 false /* is_renderer_initiated */)); |
396 } | 396 } |
397 | 397 |
398 } // namespace autofill | 398 } // namespace autofill |
OLD | NEW |