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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc

Issue 7633055: base: Fix the TODO in string_util.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chrome_mini_installer.cc Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include "base/stringprintf.h"
11 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
12 #include "base/values.h" 13 #include "base/values.h"
13 #include "chrome/app/chrome_command_ids.h" 14 #include "chrome/app/chrome_command_ids.h"
14 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chromeos/input_method/input_method_util.h" 16 #include "chrome/browser/chromeos/input_method/input_method_util.h"
16 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
18 #include "content/browser/tab_contents/tab_contents.h" 19 #include "content/browser/tab_contents/tab_contents.h"
19 #include "content/browser/user_metrics.h" 20 #include "content/browser/user_metrics.h"
20 #include "grit/chromium_strings.h" 21 #include "grit/chromium_strings.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 192
192 Browser* browser = Browser::GetBrowserForController( 193 Browser* browser = Browser::GetBrowserForController(
193 &web_ui_->tab_contents()->controller(), NULL); 194 &web_ui_->tab_contents()->controller(), NULL);
194 if (browser) 195 if (browser)
195 browser->ExecuteCommand(IDC_EXIT); 196 browser->ExecuteCommand(IDC_EXIT);
196 } 197 }
197 198
198 void CrosLanguageOptionsHandler::InputMethodDisableCallback( 199 void CrosLanguageOptionsHandler::InputMethodDisableCallback(
199 const ListValue* args) { 200 const ListValue* args) {
200 const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args)); 201 const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args));
201 const std::string action = StringPrintf( 202 const std::string action = base::StringPrintf(
202 "LanguageOptions_DisableInputMethod_%s", input_method_id.c_str()); 203 "LanguageOptions_DisableInputMethod_%s", input_method_id.c_str());
203 UserMetrics::RecordComputedAction(action); 204 UserMetrics::RecordComputedAction(action);
204 } 205 }
205 206
206 void CrosLanguageOptionsHandler::InputMethodEnableCallback( 207 void CrosLanguageOptionsHandler::InputMethodEnableCallback(
207 const ListValue* args) { 208 const ListValue* args) {
208 const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args)); 209 const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args));
209 const std::string action = StringPrintf( 210 const std::string action = base::StringPrintf(
210 "LanguageOptions_EnableInputMethod_%s", input_method_id.c_str()); 211 "LanguageOptions_EnableInputMethod_%s", input_method_id.c_str());
211 UserMetrics::RecordComputedAction(action); 212 UserMetrics::RecordComputedAction(action);
212 } 213 }
213 214
214 void CrosLanguageOptionsHandler::InputMethodOptionsOpenCallback( 215 void CrosLanguageOptionsHandler::InputMethodOptionsOpenCallback(
215 const ListValue* args) { 216 const ListValue* args) {
216 const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args)); 217 const std::string input_method_id = UTF16ToASCII(ExtractStringValue(args));
217 const std::string action = StringPrintf( 218 const std::string action = base::StringPrintf(
218 "InputMethodOptions_Open_%s", input_method_id.c_str()); 219 "InputMethodOptions_Open_%s", input_method_id.c_str());
219 UserMetrics::RecordComputedAction(action); 220 UserMetrics::RecordComputedAction(action);
220 } 221 }
221 222
222 } // namespace chromeos 223 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698