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.
5 #include "chrome/browser/chrome_browser_metrics_service_observer.h"
7 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
8 #include "net/base/network_change_notifier.h"
10 ChromeBrowserMetricsServiceObserver::ChromeBrowserMetricsServiceObserver() {
11 ChromeMetricsServiceAccessor::AddMetricsServiceObserver(this);
14 ChromeBrowserMetricsServiceObserver::~ChromeBrowserMetricsServiceObserver() {
15 ChromeMetricsServiceAccessor::RemoveMetricsServiceObserver(this);
18 void ChromeBrowserMetricsServiceObserver::OnDidCreateMetricsLog() {
19 net::NetworkChangeNotifier::LogOperatorCodeHistogram(
20 net::NetworkChangeNotifier::GetConnectionType());