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

Side by Side Diff: chrome/renderer/net/net_error_helper.cc

Issue 2588253002: Enable download page action for error page (Closed)
Patch Set: Address download feedback 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer/net/net_error_helper.h" 5 #include "chrome/renderer/net/net_error_helper.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 GetRemoteNetworkDiagnostics()->RunNetworkDiagnostics(page_url); 333 GetRemoteNetworkDiagnostics()->RunNetworkDiagnostics(page_url);
334 } 334 }
335 335
336 void NetErrorHelper::DownloadPageLater() { 336 void NetErrorHelper::DownloadPageLater() {
337 #if defined(OS_ANDROID) 337 #if defined(OS_ANDROID)
338 render_frame()->Send(new ChromeViewHostMsg_DownloadPageLater( 338 render_frame()->Send(new ChromeViewHostMsg_DownloadPageLater(
339 render_frame()->GetRoutingID())); 339 render_frame()->GetRoutingID()));
340 #endif // defined(OS_ANDROID) 340 #endif // defined(OS_ANDROID)
341 } 341 }
342 342
343 void NetErrorHelper::SetIsShowingDownloadButton(bool show) {
344 #if defined(OS_ANDROID)
345 render_frame()->Send(
346 new ChromeViewHostMsg_SetIsShowingDownloadButtonInErrorPage(
347 render_frame()->GetRoutingID(), show));
348 #endif // defined(OS_ANDROID)
349 }
350
343 void NetErrorHelper::OnNetErrorInfo(int status_num) { 351 void NetErrorHelper::OnNetErrorInfo(int status_num) {
344 DCHECK(status_num >= 0 && status_num < error_page::DNS_PROBE_MAX); 352 DCHECK(status_num >= 0 && status_num < error_page::DNS_PROBE_MAX);
345 353
346 DVLOG(1) << "Received status " << DnsProbeStatusToString(status_num); 354 DVLOG(1) << "Received status " << DnsProbeStatusToString(status_num);
347 355
348 core_->OnNetErrorInfo(static_cast<DnsProbeStatus>(status_num)); 356 core_->OnNetErrorInfo(static_cast<DnsProbeStatus>(status_num));
349 } 357 }
350 358
351 void NetErrorHelper::OnSetNavigationCorrectionInfo( 359 void NetErrorHelper::OnSetNavigationCorrectionInfo(
352 const GURL& navigation_correction_url, 360 const GURL& navigation_correction_url,
(...skipping 25 matching lines...) Expand all
378 386
379 void NetErrorHelper::OnNetworkDiagnosticsClientRequest( 387 void NetErrorHelper::OnNetworkDiagnosticsClientRequest(
380 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) { 388 chrome::mojom::NetworkDiagnosticsClientAssociatedRequest request) {
381 DCHECK(!network_diagnostics_client_binding_.is_bound()); 389 DCHECK(!network_diagnostics_client_binding_.is_bound());
382 network_diagnostics_client_binding_.Bind(std::move(request)); 390 network_diagnostics_client_binding_.Bind(std::move(request));
383 } 391 }
384 392
385 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) { 393 void NetErrorHelper::SetCanShowNetworkDiagnosticsDialog(bool can_show) {
386 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show); 394 core_->OnSetCanShowNetworkDiagnosticsDialog(can_show);
387 } 395 }
OLDNEW
« no previous file with comments | « chrome/renderer/net/net_error_helper.h ('k') | components/error_page/renderer/net_error_helper_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698