| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler
     .h" | 5 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler
     .h" | 
| 6 | 6 | 
| 7 #include <map> | 7 #include <map> | 
| 8 #include <set> | 8 #include <set> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 175 | 175 | 
| 176   return language_list; | 176   return language_list; | 
| 177 } | 177 } | 
| 178 | 178 | 
| 179 string16 CrosLanguageOptionsHandler::GetProductName() { | 179 string16 CrosLanguageOptionsHandler::GetProductName() { | 
| 180   return l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME); | 180   return l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME); | 
| 181 } | 181 } | 
| 182 | 182 | 
| 183 void CrosLanguageOptionsHandler::SetApplicationLocale( | 183 void CrosLanguageOptionsHandler::SetApplicationLocale( | 
| 184     const std::string& language_code) { | 184     const std::string& language_code) { | 
| 185   web_ui_->GetProfile()->ChangeAppLocale( | 185   Profile::FromWebUI(web_ui_)->ChangeAppLocale( | 
| 186       language_code, Profile::APP_LOCALE_CHANGED_VIA_SETTINGS); | 186       language_code, Profile::APP_LOCALE_CHANGED_VIA_SETTINGS); | 
| 187 } | 187 } | 
| 188 | 188 | 
| 189 void CrosLanguageOptionsHandler::RestartCallback(const ListValue* args) { | 189 void CrosLanguageOptionsHandler::RestartCallback(const ListValue* args) { | 
| 190   UserMetrics::RecordAction(UserMetricsAction("LanguageOptions_SignOut")); | 190   UserMetrics::RecordAction(UserMetricsAction("LanguageOptions_SignOut")); | 
| 191 | 191 | 
| 192   Browser* browser = Browser::GetBrowserForController( | 192   Browser* browser = Browser::GetBrowserForController( | 
| 193       &web_ui_->tab_contents()->controller(), NULL); | 193       &web_ui_->tab_contents()->controller(), NULL); | 
| 194   if (browser) | 194   if (browser) | 
| 195     browser->ExecuteCommand(IDC_EXIT); | 195     browser->ExecuteCommand(IDC_EXIT); | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 213 | 213 | 
| 214 void CrosLanguageOptionsHandler::InputMethodOptionsOpenCallback( | 214 void CrosLanguageOptionsHandler::InputMethodOptionsOpenCallback( | 
| 215     const ListValue* args) { | 215     const ListValue* args) { | 
| 216   const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args)); | 216   const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args)); | 
| 217   const std::string action = StringPrintf( | 217   const std::string action = StringPrintf( | 
| 218       "InputMethodOptions_Open_%s", input_method_id.c_str()); | 218       "InputMethodOptions_Open_%s", input_method_id.c_str()); | 
| 219   UserMetrics::RecordComputedAction(action); | 219   UserMetrics::RecordComputedAction(action); | 
| 220 } | 220 } | 
| 221 | 221 | 
| 222 } // namespace chromeos | 222 } // namespace chromeos | 
| OLD | NEW | 
|---|