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

Side by Side Diff: components/metrics/metrics_service_unittest.cc

Issue 1389383003: WIP: Introduce CompressibleString Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto crrev.com/1564773002 Created 4 years, 11 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 | « components/metrics/DEPS ('k') | components/metrics/persisted_logs.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 2014 The Chromium Authors. All rights reserved. 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 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 "components/metrics/metrics_service.h" 5 #include "components/metrics/metrics_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/metrics/metrics_hashes.h" 15 #include "base/metrics/metrics_hashes.h"
16 #include "base/metrics/statistics_recorder.h" 16 #include "base/metrics/statistics_recorder.h"
17 #include "base/prefs/testing_pref_service.h" 17 #include "base/prefs/testing_pref_service.h"
18 #include "base/threading/platform_thread.h" 18 #include "base/threading/platform_thread.h"
19 #include "components/compression/compression_utils.h"
20 #include "components/metrics/client_info.h" 19 #include "components/metrics/client_info.h"
21 #include "components/metrics/metrics_log.h" 20 #include "components/metrics/metrics_log.h"
22 #include "components/metrics/metrics_pref_names.h" 21 #include "components/metrics/metrics_pref_names.h"
23 #include "components/metrics/metrics_state_manager.h" 22 #include "components/metrics/metrics_state_manager.h"
24 #include "components/metrics/test_metrics_provider.h" 23 #include "components/metrics/test_metrics_provider.h"
25 #include "components/metrics/test_metrics_service_client.h" 24 #include "components/metrics/test_metrics_service_client.h"
26 #include "components/variations/metrics_util.h" 25 #include "components/variations/metrics_util.h"
27 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 #include "third_party/zlib/google/compression_utils.h"
28 28
29 namespace metrics { 29 namespace metrics {
30 30
31 namespace { 31 namespace {
32 32
33 void StoreNoClientInfoBackup(const ClientInfo& /* client_info */) { 33 void StoreNoClientInfoBackup(const ClientInfo& /* client_info */) {
34 } 34 }
35 35
36 scoped_ptr<ClientInfo> ReturnNoBackup() { 36 scoped_ptr<ClientInfo> ReturnNoBackup() {
37 return scoped_ptr<ClientInfo>(); 37 return scoped_ptr<ClientInfo>();
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 TestMetricsProvider* test_provider = new TestMetricsProvider(); 391 TestMetricsProvider* test_provider = new TestMetricsProvider();
392 service.RegisterMetricsProvider(scoped_ptr<MetricsProvider>(test_provider)); 392 service.RegisterMetricsProvider(scoped_ptr<MetricsProvider>(test_provider));
393 393
394 service.InitializeMetricsRecordingState(); 394 service.InitializeMetricsRecordingState();
395 service.Stop(); 395 service.Stop();
396 396
397 EXPECT_TRUE(test_provider->on_recording_disabled_called()); 397 EXPECT_TRUE(test_provider->on_recording_disabled_called());
398 } 398 }
399 399
400 } // namespace metrics 400 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/DEPS ('k') | components/metrics/persisted_logs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698