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

Unified Diff: chrome/browser/chromeos/customization_document.h

Issue 144363006: Expand VPD initial_locale to a list of locales. Use the expanded VPD initial_locale on the OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After-review. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/customization_document.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/customization_document.h
diff --git a/chrome/browser/chromeos/customization_document.h b/chrome/browser/chromeos/customization_document.h
index 09b0b56776997529c118ff5bdded7e9047b360f1..8d5a25388d14deabfbbb98c9b5789bf56d83bc52 100644
--- a/chrome/browser/chromeos/customization_document.h
+++ b/chrome/browser/chromeos/customization_document.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_
#include <string>
+#include <vector>
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
@@ -27,6 +28,9 @@ namespace net {
class URLFetcher;
}
+// This test is in global namespace so it must be declared here.
+void Test__InitStartupCustomizationDocument(const std::string& manifest);
+
namespace chromeos {
namespace system {
@@ -76,7 +80,15 @@ class StartupCustomizationDocument : public CustomizationDocument {
// These methods can be called even if !IsReady(), in this case VPD values
// will be returned.
+ //
+ // Raw value of "initial_locale" like initial_locale="en-US,sv,da,fi,no" .
const std::string& initial_locale() const { return initial_locale_; }
+
+ // Vector of individual locale values.
+ const std::vector<std::string>& configured_locales() const;
+
+ // Default locale value (first value in initial_locale list).
+ const std::string& initial_locale_default() const;
const std::string& initial_timezone() const { return initial_timezone_; }
const std::string& keyboard_layout() const { return keyboard_layout_; }
@@ -84,6 +96,9 @@ class StartupCustomizationDocument : public CustomizationDocument {
FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, Basic);
FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, VPD);
FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, BadManifest);
+ FRIEND_TEST_ALL_PREFIXES(ServicesCustomizationDocumentTest, MultiLanguage);
+ friend void ::Test__InitStartupCustomizationDocument(
+ const std::string& manifest);
friend struct DefaultSingletonTraits<StartupCustomizationDocument>;
// C-tor for singleton construction.
@@ -101,6 +116,7 @@ class StartupCustomizationDocument : public CustomizationDocument {
void InitFromMachineStatistic(const char* attr, std::string* value);
std::string initial_locale_;
+ std::vector<std::string> configured_locales_;
std::string initial_timezone_;
std::string keyboard_layout_;
std::string registration_url_;
@@ -138,6 +154,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
private:
FRIEND_TEST_ALL_PREFIXES(ServicesCustomizationDocumentTest, Basic);
FRIEND_TEST_ALL_PREFIXES(ServicesCustomizationDocumentTest, BadManifest);
+ FRIEND_TEST_ALL_PREFIXES(ServicesCustomizationDocumentTest, MultiLanguage);
friend struct DefaultSingletonTraits<ServicesCustomizationDocument>;
// C-tor for singleton construction.
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/customization_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698