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

Unified Diff: chrome/browser/extensions/extension_info_private_api_chromeos.cc

Issue 6995105: Expose initial_locale via chrome.chromeosInfoPrivate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use initial locale from settings Created 9 years, 6 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/extension_api.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_info_private_api_chromeos.cc
diff --git a/chrome/browser/extensions/extension_info_private_api_chromeos.cc b/chrome/browser/extensions/extension_info_private_api_chromeos.cc
index 7dc03049e3849b2dc5cd6ce85506a98a54338550..b35c06ca50a82c4dc73502b35622d02cdf898451 100644
--- a/chrome/browser/extensions/extension_info_private_api_chromeos.cc
+++ b/chrome/browser/extensions/extension_info_private_api_chromeos.cc
@@ -7,6 +7,7 @@
#include "base/values.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/network_library.h"
+#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/system_access.h"
using chromeos::CrosLibrary;
@@ -23,6 +24,9 @@ const char kPropertyHWID[] = "hwid";
// Key which corresponds to the home provider property.
const char kPropertyHomeProvider[] = "homeProvider";
+// Key which corresponds to the initial_locale property.
+const char kPropertyInitialLocale[] = "initialLocale";
+
} // namespace
GetChromeosInfoFunction::GetChromeosInfoFunction() {
@@ -60,6 +64,8 @@ bool GetChromeosInfoFunction::GetValue(const std::string& property_name,
} else {
LOG(ERROR) << "CrosLibrary can't be loaded.";
}
+ } else if (property_name == kPropertyInitialLocale) {
+ *value = chromeos::WizardController::GetInitialLocale();
} else {
LOG(ERROR) << "Unknown property request: " << property_name;
return false;
« no previous file with comments | « no previous file | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698