Commit 209dfc6b authored by eugenebut's avatar eugenebut Committed by Commit bot

[ios] Removed remaining code for URL spoofing interstitials.

Chrome for iOS does not present URL spoofing error after switching to
WKWebView.

BUG=579697

Review-Url: https://codereview.chromium.org/2424643002
Cr-Commit-Position: refs/heads/master@{#427287}
parent fbe37c72
...@@ -233,18 +233,7 @@ brand. [Length: 70em]"> ...@@ -233,18 +233,7 @@ brand. [Length: 70em]">
Password Generated by Chrome Password Generated by Chrome
</message> </message>
<!-- Safe Browsing -->
<!-- - shared strings --> <!-- - shared strings -->
<message name="IDS_IOS_INTERSTITIAL_HEADING_SPOOFING_ATTEMPT_ERROR" desc="Header error message to tell user that the requested URI might be misleading [Length: 20em]">
Warning: Something's Not Right Here!
</message>
<message name="IDS_IOS_INTERSTITIAL_SUMMARY_SPOOFING_ATTEMPT_ERROR" desc="Summary error message to tell user that the requested URI might be misleading [Length: unlimited]">
Chrome is unable to verify that the URL for this site is correct.
</message>
<message name="IDS_IOS_INTERSTITIAL_DETAILS_SPOOFING_ATTEMPT_ERROR" desc="Details error message to tell user that the requested URI might be misleading [Length: unlimited]">
The site you are trying to access is acting strangely, and Chrome is unable to verify that its URL is correct. For security reasons, you should not proceed, and perhaps try again tomorrow or go somewhere else.
</message>
<message name="IDS_IOS_UPGRADE_AVAILABLE_BUTTON" desc="Displayed on a button the user can use to upgrade the a more recent version of the application. [Length: 10em]"> <message name="IDS_IOS_UPGRADE_AVAILABLE_BUTTON" desc="Displayed on a button the user can use to upgrade the a more recent version of the application. [Length: 10em]">
Update Update
</message> </message>
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h" #include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h"
#include "ios/chrome/browser/interstitials/ios_chrome_metrics_helper.h" #include "ios/chrome/browser/interstitials/ios_chrome_metrics_helper.h"
#include "ios/chrome/grit/ios_strings.h"
#include "ios/public/provider/chrome/browser/browser_constants.h"
#import "ios/web/public/navigation_item.h" #import "ios/web/public/navigation_item.h"
#include "ios/web/public/ssl_status.h" #include "ios/web/public/ssl_status.h"
#include "ios/web/public/web_state/web_state.h" #include "ios/web/public/web_state/web_state.h"
...@@ -138,27 +136,6 @@ void IOSSSLBlockingPage::AfterShow() { ...@@ -138,27 +136,6 @@ void IOSSSLBlockingPage::AfterShow() {
void IOSSSLBlockingPage::PopulateInterstitialStrings( void IOSSSLBlockingPage::PopulateInterstitialStrings(
base::DictionaryValue* load_time_data) const { base::DictionaryValue* load_time_data) const {
ssl_error_ui_->PopulateStringsForHTML(load_time_data); ssl_error_ui_->PopulateStringsForHTML(load_time_data);
// Spoofing attempts have a custom message on iOS.
// This code will no longer be necessary once UIWebView is gone.
if (ssl_info_.cert->subject().GetDisplayName() == ios::kSpoofingAttemptFlag) {
load_time_data->SetString(
"errorCode", base::string16(base::ASCIIToUTF16("Unverified URL")));
load_time_data->SetString(
"tabTitle", l10n_util::GetStringUTF16(
IDS_IOS_INTERSTITIAL_HEADING_SPOOFING_ATTEMPT_ERROR));
load_time_data->SetString(
"heading", l10n_util::GetStringUTF16(
IDS_IOS_INTERSTITIAL_HEADING_SPOOFING_ATTEMPT_ERROR));
load_time_data->SetString(
"primaryParagraph",
l10n_util::GetStringUTF16(
IDS_IOS_INTERSTITIAL_SUMMARY_SPOOFING_ATTEMPT_ERROR));
load_time_data->SetString(
"explanationParagraph",
l10n_util::GetStringUTF16(
IDS_IOS_INTERSTITIAL_DETAILS_SPOOFING_ATTEMPT_ERROR));
load_time_data->SetString("finalParagraph", base::string16());
}
} }
// This handles the commands sent from the interstitial JavaScript. // This handles the commands sent from the interstitial JavaScript.
......
...@@ -7,8 +7,6 @@ import("//ios/public/provider/chrome/browser/build_config.gni") ...@@ -7,8 +7,6 @@ import("//ios/public/provider/chrome/browser/build_config.gni")
source_set("browser") { source_set("browser") {
sources = [ sources = [
"browser_constants.cc",
"browser_constants.h",
"chrome_browser_provider.h", "chrome_browser_provider.h",
"chrome_browser_provider.mm", "chrome_browser_provider.mm",
"geolocation_updater_provider.h", "geolocation_updater_provider.h",
......
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ios/public/provider/chrome/browser/browser_constants.h"
namespace ios {
const char kSpoofingAttemptFlag[] = "SpoofingAttempt_IOS";
} // namespace ios
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_CONSTANTS_H_
#define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_CONSTANTS_H_
namespace ios {
// This string is a flag for net::SSLInfo signaling that the error is not a
// typical certificate error, but rather is a spoofing attempt.
// It can be used to customize the interstitial error page.
extern const char kSpoofingAttemptFlag[];
} // namespace ios
#endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_CONSTANTS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment