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

Side by Side Diff: chromeos/system/fake_statistics_provider.cc

Issue 2958353002: [Cleanup] Migrate the StatisticsProvider to use the TaskScheduler (Closed)
Patch Set: rewrap a line Created 3 years, 5 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 | « chromeos/system/fake_statistics_provider.h ('k') | chromeos/system/statistics_provider.h » ('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 "chromeos/system/fake_statistics_provider.h" 5 #include "chromeos/system/fake_statistics_provider.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 namespace system { 8 namespace system {
9 9
10 FakeStatisticsProvider::FakeStatisticsProvider() { 10 FakeStatisticsProvider::FakeStatisticsProvider() {
11 } 11 }
12 12
13 FakeStatisticsProvider::~FakeStatisticsProvider() { 13 FakeStatisticsProvider::~FakeStatisticsProvider() {
14 } 14 }
15 15
16 void FakeStatisticsProvider::StartLoadingMachineStatistics( 16 void FakeStatisticsProvider::StartLoadingMachineStatistics(
17 const scoped_refptr<base::TaskRunner>& file_task_runner,
18 bool load_oem_manifest) { 17 bool load_oem_manifest) {
19 } 18 }
20 19
21 bool FakeStatisticsProvider::GetMachineStatistic(const std::string& name, 20 bool FakeStatisticsProvider::GetMachineStatistic(const std::string& name,
22 std::string* result) { 21 std::string* result) {
23 std::map<std::string, std::string>::const_iterator match = 22 std::map<std::string, std::string>::const_iterator match =
24 machine_statistics_.find(name); 23 machine_statistics_.find(name);
25 if (match != machine_statistics_.end() && result) 24 if (match != machine_statistics_.end() && result)
26 *result = match->second; 25 *result = match->second;
27 return match != machine_statistics_.end(); 26 return match != machine_statistics_.end();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 ScopedFakeStatisticsProvider::ScopedFakeStatisticsProvider() { 64 ScopedFakeStatisticsProvider::ScopedFakeStatisticsProvider() {
66 StatisticsProvider::SetTestProvider(this); 65 StatisticsProvider::SetTestProvider(this);
67 } 66 }
68 67
69 ScopedFakeStatisticsProvider::~ScopedFakeStatisticsProvider() { 68 ScopedFakeStatisticsProvider::~ScopedFakeStatisticsProvider() {
70 StatisticsProvider::SetTestProvider(NULL); 69 StatisticsProvider::SetTestProvider(NULL);
71 } 70 }
72 71
73 } // namespace system 72 } // namespace system
74 } // namespace chromeos 73 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/system/fake_statistics_provider.h ('k') | chromeos/system/statistics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698