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

Side by Side Diff: chrome/browser/ssl/captive_portal_blocking_page.cc

Issue 2858043004: Support interstitials with no primary button (Closed)
Patch Set: Fix iOS CanGoBack implementation Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/security_interstitials/content/security_interstitial_controller_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ssl/captive_portal_blocking_page.h" 5 #include "chrome/browser/ssl/captive_portal_blocking_page.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // opposed to SafeBrowsing subresource interstitials which just block access 140 // opposed to SafeBrowsing subresource interstitials which just block access
141 // to the current page and don't create a new entry. 141 // to the current page and don't create a new entry.
142 return true; 142 return true;
143 } 143 }
144 144
145 void CaptivePortalBlockingPage::PopulateInterstitialStrings( 145 void CaptivePortalBlockingPage::PopulateInterstitialStrings(
146 base::DictionaryValue* load_time_data) { 146 base::DictionaryValue* load_time_data) {
147 load_time_data->SetString("iconClass", "icon-offline"); 147 load_time_data->SetString("iconClass", "icon-offline");
148 load_time_data->SetString("type", "CAPTIVE_PORTAL"); 148 load_time_data->SetString("type", "CAPTIVE_PORTAL");
149 load_time_data->SetBoolean("overridable", false); 149 load_time_data->SetBoolean("overridable", false);
150 load_time_data->SetBoolean("hide_primary_button", false);
150 151
151 // |IsWifiConnection| isn't accurate on some platforms, so always try to get 152 // |IsWifiConnection| isn't accurate on some platforms, so always try to get
152 // the Wi-Fi SSID even if |IsWifiConnection| is false. 153 // the Wi-Fi SSID even if |IsWifiConnection| is false.
153 std::string wifi_ssid = GetWiFiSSID(); 154 std::string wifi_ssid = GetWiFiSSID();
154 bool is_wifi = !wifi_ssid.empty() || IsWifiConnection(); 155 bool is_wifi = !wifi_ssid.empty() || IsWifiConnection();
155 156
156 load_time_data->SetString( 157 load_time_data->SetString(
157 "primaryButtonText", 158 "primaryButtonText",
158 l10n_util::GetStringUTF16(IDS_CAPTIVE_PORTAL_BUTTON_OPEN_LOGIN_PAGE)); 159 l10n_util::GetStringUTF16(IDS_CAPTIVE_PORTAL_BUTTON_OPEN_LOGIN_PAGE));
159 160
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED); 274 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED);
274 } 275 }
275 276
276 // Need to explicity deny the certificate via the callback, otherwise memory 277 // Need to explicity deny the certificate via the callback, otherwise memory
277 // is leaked. 278 // is leaked.
278 if (!callback_.is_null()) { 279 if (!callback_.is_null()) {
279 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); 280 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
280 callback_.Reset(); 281 callback_.Reset();
281 } 282 }
282 } 283 }
OLDNEW
« no previous file with comments | « no previous file | components/security_interstitials/content/security_interstitial_controller_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698