Index: chrome/browser/chromeos/customization_document.cc |
diff --git a/chrome/browser/chromeos/customization_document.cc b/chrome/browser/chromeos/customization_document.cc |
index 260531a7670847bfffebaeaa4f471a9df79f76cc..61adefa967ced9f09c09b772ca509c323e2db632 100644 |
--- a/chrome/browser/chromeos/customization_document.cc |
+++ b/chrome/browser/chromeos/customization_document.cc |
@@ -4,6 +4,8 @@ |
#include "chrome/browser/chromeos/customization_document.h" |
+#include <algorithm> |
+ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
#include "base/file_util.h" |
@@ -37,6 +39,7 @@ |
#include "net/http/http_response_headers.h" |
#include "net/http/http_status_code.h" |
#include "net/url_request/url_fetcher.h" |
+#include "ui/base/l10n/l10n_util.h" |
using content::BrowserThread; |
@@ -304,6 +307,12 @@ void StartupCustomizationDocument::Init( |
&keyboard_layout_); |
configured_locales_.resize(0); |
base::SplitString(initial_locale_, ',', &configured_locales_); |
+ |
+ // Convert ICU locale to chrome ("en_US" to "en-US", etc.). |
+ std::for_each(configured_locales_.begin(), |
+ configured_locales_.end(), |
+ l10n_util::GetCanonicalLocale); |
+ |
// Let's always have configured_locales_.front() a valid entry. |
if (configured_locales_.size() == 0) |
configured_locales_.push_back(std::string()); |