| OLD | NEW |
| 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 #include "chrome/browser/metrics/metrics_service.h" | 5 #include "chrome/browser/metrics/metrics_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/prefs/testing_pref_service.h" | 10 #include "base/prefs/testing_pref_service.h" |
| 11 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
| 12 #include "chrome/browser/google/google_util.h" | 12 #include "chrome/browser/google/google_util.h" |
| 13 #include "chrome/browser/metrics/metrics_state_manager.h" | |
| 14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 15 #include "chrome/test/base/scoped_testing_local_state.h" | 14 #include "chrome/test/base/scoped_testing_local_state.h" |
| 16 #include "chrome/test/base/testing_browser_process.h" | 15 #include "chrome/test/base/testing_browser_process.h" |
| 17 #include "components/metrics/metrics_log_base.h" | 16 #include "components/metrics/metrics_log_base.h" |
| 18 #include "components/metrics/metrics_service_observer.h" | 17 #include "components/metrics/metrics_service_observer.h" |
| 18 #include "components/metrics/metrics_state_manager.h" |
| 19 #include "components/metrics/test_metrics_service_client.h" | 19 #include "components/metrics/test_metrics_service_client.h" |
| 20 #include "components/variations/metrics_util.h" | 20 #include "components/variations/metrics_util.h" |
| 21 #include "content/public/test/test_browser_thread_bundle.h" | 21 #include "content/public/test/test_browser_thread_bundle.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 | 23 |
| 24 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
| 25 #include "chromeos/login/login_state.h" | 25 #include "chromeos/login/login_state.h" |
| 26 #endif // defined(OS_CHROMEOS) | 26 #endif // defined(OS_CHROMEOS) |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 service.RemoveObserver(&observer1); | 316 service.RemoveObserver(&observer1); |
| 317 | 317 |
| 318 service.OpenNewLog(); | 318 service.OpenNewLog(); |
| 319 EXPECT_EQ(2, observer1.observed()); | 319 EXPECT_EQ(2, observer1.observed()); |
| 320 EXPECT_EQ(2, observer2.observed()); | 320 EXPECT_EQ(2, observer2.observed()); |
| 321 service.log_manager_.FinishCurrentLog(); | 321 service.log_manager_.FinishCurrentLog(); |
| 322 | 322 |
| 323 service.RemoveObserver(&observer2); | 323 service.RemoveObserver(&observer2); |
| 324 } | 324 } |
| OLD | NEW |