Commit 2362d827 authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Remove link to network diagnostics dialog on OSX.

CFNetDiagnosticDiagnoseProblemInteractively has been deprecated, and
now apparently does nothing. We could consider using
/System/Library/CoreServices/Applications/Wireless Diagnostics.app/,
but that would require a bit more investigation and though, so just
removing the link for now.

Bug: 810215
Change-Id: Iabe0698b17734743c092701eced0297eb71d77b7
Reviewed-on: https://chromium-review.googlesource.com/932722
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540548}
parent 2a6dabd7
...@@ -770,7 +770,7 @@ jumbo_split_static_library("browser") { ...@@ -770,7 +770,7 @@ jumbo_split_static_library("browser") {
"net/loading_predictor_observer.cc", "net/loading_predictor_observer.cc",
"net/loading_predictor_observer.h", "net/loading_predictor_observer.h",
"net/net_error_diagnostics_dialog.h", "net/net_error_diagnostics_dialog.h",
"net/net_error_diagnostics_dialog_mac.cc", "net/net_error_diagnostics_dialog_posix.cc",
"net/net_error_diagnostics_dialog_win.cc", "net/net_error_diagnostics_dialog_win.cc",
"net/net_error_tab_helper.cc", "net/net_error_tab_helper.cc",
"net/net_error_tab_helper.h", "net/net_error_tab_helper.h",
...@@ -3102,8 +3102,6 @@ jumbo_split_static_library("browser") { ...@@ -3102,8 +3102,6 @@ jumbo_split_static_library("browser") {
"recovery/recovery_install_global_error_factory.cc", "recovery/recovery_install_global_error_factory.cc",
"recovery/recovery_install_global_error_factory.h", "recovery/recovery_install_global_error_factory.h",
] ]
} else {
sources += [ "net/net_error_diagnostics_dialog_generic.cc" ]
} }
if (is_win || is_linux) { if (is_win || is_linux) {
......
// Copyright 2015 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 <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/strings/sys_string_conversions.h"
bool CanShowNetworkDiagnosticsDialog() {
return true;
}
void ShowNetworkDiagnosticsDialog(content::WebContents* web_contents,
const std::string& failed_url) {
base::ScopedCFTypeRef<CFStringRef> url_string_ref(
base::SysUTF8ToCFStringRef(failed_url));
base::ScopedCFTypeRef<CFURLRef> url_ref(
CFURLCreateWithString(kCFAllocatorDefault, url_string_ref.get(),
nullptr));
if (!url_ref.get())
return;
base::ScopedCFTypeRef<CFNetDiagnosticRef> diagnostic_ref(
CFNetDiagnosticCreateWithURL(kCFAllocatorDefault, url_ref.get()));
if (!diagnostic_ref.get())
return;
CFNetDiagnosticDiagnoseProblemInteractively(diagnostic_ref.get());
}
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