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

Unified Diff: chrome/browser/chromeos/extensions/info_private_api.cc

Issue 165643002: Expose customization ID via chromeInfoPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | chrome/common/extensions/api/chromeos_info_private.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/info_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/info_private_api.cc b/chrome/browser/chromeos/extensions/info_private_api.cc
index ed74a976cba3968511ae803a63e801d2b082c061..234d89ad5f9db960fa4b29d19201a36751f6c81f 100644
--- a/chrome/browser/chromeos/extensions/info_private_api.cc
+++ b/chrome/browser/chromeos/extensions/info_private_api.cc
@@ -32,6 +32,9 @@ namespace {
// Key which corresponds to the HWID setting.
const char kPropertyHWID[] = "hwid";
+// Key which corresponds to the customization ID setting.
+const char kPropertyCustomizationID[] = "customizationId";
+
// Key which corresponds to the home provider property.
const char kPropertyHomeProvider[] = "homeProvider";
@@ -126,6 +129,13 @@ base::Value* ChromeosInfoPrivateGetFunction::GetValue(
chromeos::system::StatisticsProvider::GetInstance();
provider->GetMachineStatistic(chromeos::system::kHardwareClassKey, &hwid);
return new base::StringValue(hwid);
+ } else if (property_name == kPropertyCustomizationID) {
+ std::string customization_id;
+ chromeos::system::StatisticsProvider* provider =
+ chromeos::system::StatisticsProvider::GetInstance();
+ provider->GetMachineStatistic(chromeos::system::kCustomizationIdKey,
+ &customization_id);
+ return new base::StringValue(customization_id);
} else if (property_name == kPropertyHomeProvider) {
const chromeos::DeviceState* cellular_device =
NetworkHandler::Get()->network_state_handler()->GetDeviceStateByType(
« no previous file with comments | « no previous file | chrome/common/extensions/api/chromeos_info_private.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698