Revert 270745 "Enable ServiceDiscoveryClientMdns." to fix crash.

> Enable ServiceDiscoveryClientMdns.
> 
> BUG=349645
> 
> Review URL: https://codereview.chromium.org/287923002

BUG=391907

TBR=vitalybuka@chromium.org

Review URL: https://codereview.chromium.org/452843002

Cr-Commit-Position: refs/heads/master@{#288266}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288266 0039d316-1c4b-4281-b951-d872f2087c98
parent 9045183d
......@@ -20,16 +20,12 @@
#endif
#if defined(ENABLE_MDNS)
#include "chrome/browser/local_discovery/service_discovery_client_mdns.h"
#include "chrome/browser/local_discovery/service_discovery_client_utility.h"
#endif // ENABLE_MDNS
namespace {
#if defined(OS_WIN)
bool g_is_firewall_ready = false;
void ReportFirewallStats() {
base::FilePath exe_path;
if (!PathService::Get(base::FILE_EXE, &exe_path))
......@@ -40,9 +36,9 @@ void ReportFirewallStats() {
exe_path);
if (!manager)
return;
g_is_firewall_ready = manager->CanUseLocalPorts();
bool is_ready = manager->CanUseLocalPorts();
UMA_HISTOGRAM_TIMES("LocalDiscovery.FirewallAccessTime", timer.Elapsed());
UMA_HISTOGRAM_BOOLEAN("LocalDiscovery.IsFirewallReady", g_is_firewall_ready);
UMA_HISTOGRAM_BOOLEAN("LocalDiscovery.IsFirewallReady", is_ready);
}
#endif // OS_WIN
......@@ -84,13 +80,11 @@ scoped_refptr<ServiceDiscoverySharedClient>
static bool reported =
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&ReportFirewallStats));
// TODO(vitalybuka): Switch to |ServiceDiscoveryClientMdns| after we find what
// to do with firewall for user-level installs. crbug.com/366408
if (!g_is_firewall_ready)
return new ServiceDiscoveryClientUtility();
#endif // OS_WIN
return new ServiceDiscoveryClientMdns();
// TODO(vitalybuka): Switch to |ServiceDiscoveryClientMdns| after we find what
// to do with firewall for user-level installs. crbug.com/366408
return new ServiceDiscoveryClientUtility();
#endif // OS_MACOSX
}
......
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