1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "chrome/browser/chrome_browser_metrics_service_observer.h" 6 7 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" 8 #include "net/base/network_change_notifier.h" 9 10 ChromeBrowserMetricsServiceObserver::ChromeBrowserMetricsServiceObserver() { 11 ChromeMetricsServiceAccessor::AddMetricsServiceObserver(this); 12 } 13 14 ChromeBrowserMetricsServiceObserver::~ChromeBrowserMetricsServiceObserver() { 15 ChromeMetricsServiceAccessor::RemoveMetricsServiceObserver(this); 16 } 17 18 void ChromeBrowserMetricsServiceObserver::OnDidCreateMetricsLog() { 19 net::NetworkChangeNotifier::LogOperatorCodeHistogram( 20 net::NetworkChangeNotifier::GetConnectionType()); 21 } 22