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

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

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/language_options_handler.h" 5 #include "chrome/browser/ui/webui/options/language_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/command_line.h" 16 #include "base/command_line.h"
17 #include "base/i18n/rtl.h" 17 #include "base/i18n/rtl.h"
18 #include "base/metrics/user_metrics.h"
18 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h" 20 #include "base/values.h"
20 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/lifetime/application_lifetime.h" 22 #include "chrome/browser/lifetime/application_lifetime.h"
22 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
23 #include "chrome/common/pref_names.h" 24 #include "chrome/common/pref_names.h"
24 #include "chrome/grit/generated_resources.h" 25 #include "chrome/grit/generated_resources.h"
25 #include "components/prefs/pref_service.h" 26 #include "components/prefs/pref_service.h"
26 #include "content/public/browser/user_metrics.h"
27 #include "content/public/browser/web_ui.h" 27 #include "content/public/browser/web_ui.h"
28 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
29 29
30 using base::UserMetricsAction; 30 using base::UserMetricsAction;
31 31
32 namespace options { 32 namespace options {
33 33
34 LanguageOptionsHandler::LanguageOptionsHandler() { 34 LanguageOptionsHandler::LanguageOptionsHandler() {
35 } 35 }
36 36
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return language_list; 116 return language_list;
117 } 117 }
118 118
119 void LanguageOptionsHandler::SetApplicationLocale( 119 void LanguageOptionsHandler::SetApplicationLocale(
120 const std::string& language_code) { 120 const std::string& language_code) {
121 PrefService* pref_service = g_browser_process->local_state(); 121 PrefService* pref_service = g_browser_process->local_state();
122 pref_service->SetString(prefs::kApplicationLocale, language_code); 122 pref_service->SetString(prefs::kApplicationLocale, language_code);
123 } 123 }
124 124
125 void LanguageOptionsHandler::RestartCallback(const base::ListValue* args) { 125 void LanguageOptionsHandler::RestartCallback(const base::ListValue* args) {
126 content::RecordAction(UserMetricsAction("LanguageOptions_Restart")); 126 base::RecordAction(UserMetricsAction("LanguageOptions_Restart"));
127 chrome::AttemptRestart(); 127 chrome::AttemptRestart();
128 } 128 }
129 129
130 } // namespace options 130 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698