forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lacros: Show connectivity diagnostics link on network error page
This CL lets Lacros to show connectivity diagnostics link on network error page. Bug: 1308098 Change-Id: I249861e1e480871d58278d047e6945c1e3b4cdd0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3762115 Reviewed-by: Yutaka Hirano <[email protected]> Commit-Queue: Eriko Kurimoto <[email protected]> Cr-Commit-Position: refs/heads/main@{#1026570}
- Loading branch information
Showing
5 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2022 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 "chrome/browser/net/net_error_diagnostics_dialog.h" | ||
|
||
#include "chrome/browser/profiles/profile.h" | ||
#include "chrome/browser/ui/chrome_pages.h" | ||
#include "content/public/browser/web_contents.h" | ||
|
||
bool CanShowNetworkDiagnosticsDialog(content::WebContents* web_contents) { | ||
// The ChromeOS network diagnostics dialog can be shown in incognito and guest | ||
// profiles since it does not log the referring URL. | ||
return true; | ||
} | ||
|
||
void ShowNetworkDiagnosticsDialog(content::WebContents* web_contents, | ||
const std::string& failed_url) { | ||
Profile* profile = | ||
Profile::FromBrowserContext(web_contents->GetBrowserContext()); | ||
|
||
chrome::ShowConnectivityDiagnosticsApp(profile); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters