Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser/local_discovery/service_discovery_client_mdns.h" | 5 #include "chrome/browser/local_discovery/service_discovery_client_mdns.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "chrome/browser/local_discovery/service_discovery_host_client.h" | 8 #include "chrome/browser/local_discovery/service_discovery_host_client.h" |
| 9 #include "chrome/common/local_discovery/service_discovery_client_impl.h" | |
|
Lei Zhang
2014/04/27 05:35:04
not needed?
Vitaly Buka (NO REVIEWS)
2014/04/27 18:39:36
Done.
| |
| 9 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 10 | 11 |
| 11 namespace local_discovery { | 12 namespace local_discovery { |
| 12 | 13 |
| 13 using content::BrowserThread; | 14 using content::BrowserThread; |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 const int kMaxRestartAttempts = 10; | 17 const int kMaxRestartAttempts = 10; |
| 17 const int kRestartDelayOnNetworkChangeSeconds = 3; | 18 const int kRestartDelayOnNetworkChangeSeconds = 3; |
| 18 const int kReportSuccessAfterSeconds = 10; | 19 const int kReportSuccessAfterSeconds = 10; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 if (old_client) | 99 if (old_client) |
| 99 old_client->InvalidateWatchers(); | 100 old_client->InvalidateWatchers(); |
| 100 } | 101 } |
| 101 | 102 |
| 102 void ServiceDiscoveryClientMdns::ReportSuccess() { | 103 void ServiceDiscoveryClientMdns::ReportSuccess() { |
| 103 UMA_HISTOGRAM_COUNTS_100("LocalDiscovery.ClientRestartAttempts", | 104 UMA_HISTOGRAM_COUNTS_100("LocalDiscovery.ClientRestartAttempts", |
| 104 kMaxRestartAttempts - restart_attempts_); | 105 kMaxRestartAttempts - restart_attempts_); |
| 105 } | 106 } |
| 106 | 107 |
| 107 } // namespace local_discovery | 108 } // namespace local_discovery |
| OLD | NEW |