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

Unified Diff: chromeos/system/statistics_provider.h

Issue 25112004: Move statistics_provider to chromeos/system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, fix DeviceManagement Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/system/statistics_provider.h
diff --git a/chrome/browser/chromeos/system/statistics_provider.h b/chromeos/system/statistics_provider.h
similarity index 52%
rename from chrome/browser/chromeos/system/statistics_provider.h
rename to chromeos/system/statistics_provider.h
index 35ab756426964492f18bd0c9d81f13538f4d3f09..eaf877629786d0029d787805f8744b747eb40da2 100644
--- a/chrome/browser/chromeos/system/statistics_provider.h
+++ b/chromeos/system/statistics_provider.h
@@ -2,48 +2,52 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
-#define CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
+#ifndef CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
+#define CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
#include <string>
+#include "base/memory/ref_counted.h"
+#include "chromeos/chromeos_export.h"
+
+namespace base {
+class TaskRunner;
+}
+
namespace chromeos {
namespace system {
// Developer switch value.
-extern const char kDevSwitchBootMode[];
+CHROMEOS_EXPORT extern const char kDevSwitchBootMode[];
// HWID key.
-extern const char kHardwareClass[];
+CHROMEOS_EXPORT extern const char kHardwareClassKey[];
// OEM customization flag that permits exiting enterprise enrollment flow in
// OOBE when 'oem_enterprise_managed' flag is set.
-extern const char kOemCanExitEnterpriseEnrollmentKey[];
+CHROMEOS_EXPORT extern const char kOemCanExitEnterpriseEnrollmentKey[];
// OEM customization directive that specified intended device purpose.
-extern const char kOemDeviceRequisitionKey[];
+CHROMEOS_EXPORT extern const char kOemDeviceRequisitionKey[];
// OEM customization flag that enforces enterprise enrollment flow in OOBE.
-extern const char kOemIsEnterpriseManagedKey[];
+CHROMEOS_EXPORT extern const char kOemIsEnterpriseManagedKey[];
// OEM customization flag that specifies if OOBE flow should be enhanced for
// keyboard driven control.
-extern const char kOemKeyboardDrivenOobeKey[];
+CHROMEOS_EXPORT extern const char kOemKeyboardDrivenOobeKey[];
// Offer coupon code key.
-extern const char kOffersCouponCodeKey[];
+CHROMEOS_EXPORT extern const char kOffersCouponCodeKey[];
// Offer group key.
-extern const char kOffersGroupCodeKey[];
+CHROMEOS_EXPORT extern const char kOffersGroupCodeKey[];
// This interface provides access to Chrome OS statistics.
-class StatisticsProvider {
+class CHROMEOS_EXPORT StatisticsProvider {
public:
- // Initializes the statistics provider.
- virtual void Init() = 0;
-
- // Starts loading the machine statistcs.
- virtual void StartLoadingMachineStatistics() = 0;
+ // Starts loading the machine statistics.
+ virtual void StartLoadingMachineStatistics(bool load_oem_manifest) = 0;
// Retrieve the named machine statistic (e.g. "hardware_class").
// This does not update the statistcs. If the |name| is not set, |result|
@@ -52,12 +56,11 @@ class StatisticsProvider {
std::string* result) = 0;
// Retrieve boolean value for named machine flag.
satorux1 2013/10/02 01:36:55 You might want to document that this can be called
stevenjb 2013/10/03 01:17:23 Ditto.
- virtual bool GetMachineFlag(const std::string& name,
- bool* result) = 0;
-
- // Loads kiosk oem manifest file.
- virtual void LoadOemManifest() = 0;
+ virtual bool GetMachineFlag(const std::string& name, bool* result) = 0;
+ // Manage the singleton. Initialize must be called before GetInstance.
+ static void Initialize(const scoped_refptr<base::TaskRunner>& io_task_runner);
+ static void Shutdown();
static StatisticsProvider* GetInstance();
protected:
@@ -67,4 +70,4 @@ class StatisticsProvider {
} // namespace system
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_
+#endif // CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698