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

Unified Diff: chrome/browser/local_discovery/service_discovery_shared_client.cc

Issue 268763006: Disable firewall check. It takes signifficant time, need to be on FILE thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fri 05/02/2014 16:39:31.63 Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/service_discovery_shared_client.cc
diff --git a/chrome/browser/local_discovery/service_discovery_shared_client.cc b/chrome/browser/local_discovery/service_discovery_shared_client.cc
index dcfb64b93e8322c5737498862f83e6aeaa9fcd0a..bd19b419e5c964543ea7955c3fde9c38b7a24749 100644
--- a/chrome/browser/local_discovery/service_discovery_shared_client.cc
+++ b/chrome/browser/local_discovery/service_discovery_shared_client.cc
@@ -27,20 +27,19 @@
namespace {
#if defined(OS_WIN)
-bool IsFirewallReady() {
+void ReportFirewallStats() {
base::FilePath exe_path;
if (!PathService::Get(base::FILE_EXE, &exe_path))
- return false;
+ return;
base::ElapsedTimer timer;
scoped_ptr<installer::FirewallManager> manager =
installer::FirewallManager::Create(BrowserDistribution::GetDistribution(),
exe_path);
if (!manager)
- return false;
+ return;
bool is_ready = manager->CanUseLocalPorts();
UMA_HISTOGRAM_TIMES("LocalDiscovery.FirewallAccessTime", timer.Elapsed());
UMA_HISTOGRAM_BOOLEAN("LocalDiscovery.IsFirewallReady", is_ready);
- return is_ready;
}
#endif // OS_WIN
@@ -79,12 +78,12 @@ scoped_refptr<ServiceDiscoverySharedClient>
#else
#if defined(OS_WIN)
- static bool is_firewall_ready = IsFirewallReady();
- if (!is_firewall_ready) {
- // TODO(vitalybuka): Remove after we find what to do with firewall for
- // user-level installs. crbug.com/366408
- return new ServiceDiscoveryClientUtility();
- }
+ 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
+ return new ServiceDiscoveryClientUtility();
#endif // OS_WIN
return new ServiceDiscoveryClientMdns();
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698