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

Side by Side Diff: net/base/network_change_notifier.h

Issue 253203002: Log operator code histogram on new metric log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@api_move
Patch Set: . Created 6 years, 7 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 unified diff | Download patch
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/observer_list_threadsafe.h" 9 #include "base/observer_list_threadsafe.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // Register the Observer callbacks for producing histogram data. This 225 // Register the Observer callbacks for producing histogram data. This
226 // should be called from the network thread to avoid race conditions. 226 // should be called from the network thread to avoid race conditions.
227 // ShutdownHistogramWatcher() must be called prior to NetworkChangeNotifier 227 // ShutdownHistogramWatcher() must be called prior to NetworkChangeNotifier
228 // destruction. 228 // destruction.
229 static void InitHistogramWatcher(); 229 static void InitHistogramWatcher();
230 230
231 // Unregister the Observer callbacks for producing histogram data. This 231 // Unregister the Observer callbacks for producing histogram data. This
232 // should be called from the network thread to avoid race conditions. 232 // should be called from the network thread to avoid race conditions.
233 static void ShutdownHistogramWatcher(); 233 static void ShutdownHistogramWatcher();
234 234
235 // Log the |NCN.NetworkOperatorMCCMNC| histogram.
236 static void LogOperatorCodeHistogram(ConnectionType type);
237
235 // Allows a second NetworkChangeNotifier to be created for unit testing, so 238 // Allows a second NetworkChangeNotifier to be created for unit testing, so
236 // the test suite can create a MockNetworkChangeNotifier, but platform 239 // the test suite can create a MockNetworkChangeNotifier, but platform
237 // specific NetworkChangeNotifiers can also be created for testing. To use, 240 // specific NetworkChangeNotifiers can also be created for testing. To use,
238 // create an DisableForTest object, and then create the new 241 // create an DisableForTest object, and then create the new
239 // NetworkChangeNotifier object. The NetworkChangeNotifier must be 242 // NetworkChangeNotifier object. The NetworkChangeNotifier must be
240 // destroyed before the DisableForTest object, as its destruction will restore 243 // destroyed before the DisableForTest object, as its destruction will restore
241 // the original NetworkChangeNotifier. 244 // the original NetworkChangeNotifier.
242 class NET_EXPORT DisableForTest { 245 class NET_EXPORT DisableForTest {
243 public: 246 public:
244 DisableForTest(); 247 DisableForTest();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 323
321 // Computes NetworkChange signal from IPAddress and ConnectionType signals. 324 // Computes NetworkChange signal from IPAddress and ConnectionType signals.
322 scoped_ptr<NetworkChangeCalculator> network_change_calculator_; 325 scoped_ptr<NetworkChangeCalculator> network_change_calculator_;
323 326
324 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); 327 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier);
325 }; 328 };
326 329
327 } // namespace net 330 } // namespace net
328 331
329 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 332 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698