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

Side by Side Diff: chrome/browser/metrics/metrics_service_unittest.cc

Issue 239093004: Move part of metrics from chrome/common to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding TBR section for owners of minor changes. 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
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 #include "chrome/browser/metrics/metrics_service.h" 5 #include "chrome/browser/metrics/metrics_service.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/threading/platform_thread.h" 11 #include "base/threading/platform_thread.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chrome/test/base/scoped_testing_local_state.h" 14 #include "chrome/test/base/scoped_testing_local_state.h"
15 #include "chrome/test/base/testing_browser_process.h" 15 #include "chrome/test/base/testing_browser_process.h"
16 #include "components/variations/metrics_util.h" 16 #include "components/variations/metrics_util.h"
17 #include "content/public/common/process_type.h" 17 #include "content/public/common/process_type.h"
18 #include "content/public/common/webplugininfo.h" 18 #include "content/public/common/webplugininfo.h"
19 #include "content/public/test/test_browser_thread_bundle.h" 19 #include "content/public/test/test_browser_thread_bundle.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "ui/gfx/size.h" 21 #include "ui/gfx/size.h"
22 22
23 #if defined(OS_CHROMEOS) 23 #if defined(OS_CHROMEOS)
24 #include "chrome/browser/metrics/metrics_log_chromeos.h" 24 #include "chrome/browser/metrics/metrics_log_chromeos.h"
25 #endif // OS_CHROMEOS 25 #endif // OS_CHROMEOS
26 26
27 namespace { 27 namespace {
28 28
29 using metrics::MetricsLogManager;
30
29 class TestMetricsService : public MetricsService { 31 class TestMetricsService : public MetricsService {
30 public: 32 public:
31 TestMetricsService() {} 33 TestMetricsService() {}
32 virtual ~TestMetricsService() {} 34 virtual ~TestMetricsService() {}
33 35
34 MetricsLogManager* log_manager() { 36 MetricsLogManager* log_manager() {
35 return &log_manager_; 37 return &log_manager_;
36 } 38 }
37 39
38 private: 40 private:
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 service.GetLowEntropySource(); 407 service.GetLowEntropySource();
406 408
407 EXPECT_FALSE(GetLocalState()->GetBoolean(prefs::kMetricsResetIds)); 409 EXPECT_FALSE(GetLocalState()->GetBoolean(prefs::kMetricsResetIds));
408 } 410 }
409 411
410 std::string new_client_id = 412 std::string new_client_id =
411 GetLocalState()->GetString(prefs::kMetricsClientID); 413 GetLocalState()->GetString(prefs::kMetricsClientID);
412 414
413 EXPECT_NE(kInitialClientId, new_client_id); 415 EXPECT_NE(kInitialClientId, new_client_id);
414 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698