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

Side by Side Diff: chrome/browser/chromeos/system/statistics_provider.h

Issue 11778025: Decouple loading of channel info and the rest of machine statistics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more comments, DCHECK. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace chromeos { 10 namespace chromeos {
11 namespace system { 11 namespace system {
12 12
13 // This interface provides access to Chrome OS statistics. 13 // This interface provides access to Chrome OS statistics.
14 class StatisticsProvider { 14 class StatisticsProvider {
15 public: 15 public:
16 // Initializes the statistics provider. 16 // Initializes the statistics provider.
17 virtual void Init() = 0; 17 virtual void Init() = 0;
18 18
19 // Starts loading the machine statistcs.
20 virtual void StartLoadingMachineStatistics() = 0;
21
19 // Retrieve the named machine statistic (e.g. "hardware_class"). 22 // Retrieve the named machine statistic (e.g. "hardware_class").
20 // This does not update the statistcs. If the |name| is not set, |result| 23 // This does not update the statistcs. If the |name| is not set, |result|
21 // preserves old value. 24 // preserves old value.
22 virtual bool GetMachineStatistic(const std::string& name, 25 virtual bool GetMachineStatistic(const std::string& name,
23 std::string* result) = 0; 26 std::string* result) = 0;
24 27
25 static StatisticsProvider* GetInstance(); 28 static StatisticsProvider* GetInstance();
26 29
27 protected: 30 protected:
28 virtual ~StatisticsProvider() {} 31 virtual ~StatisticsProvider() {}
29 }; 32 };
30 33
31 } // namespace system 34 } // namespace system
32 } // namespace chromeos 35 } // namespace chromeos
33 36
34 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ 37 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698