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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/i18n/rtl.h" 16 #include "base/i18n/rtl.h"
17 #include "base/prefs/pref_service.h"
18 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h" 18 #include "base/values.h"
20 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/lifetime/application_lifetime.h" 20 #include "chrome/browser/lifetime/application_lifetime.h"
22 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
23 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
24 #include "chrome/grit/generated_resources.h" 23 #include "chrome/grit/generated_resources.h"
24 #include "components/prefs/pref_service.h"
25 #include "content/public/browser/user_metrics.h" 25 #include "content/public/browser/user_metrics.h"
26 #include "content/public/browser/web_ui.h" 26 #include "content/public/browser/web_ui.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 28
29 using base::UserMetricsAction; 29 using base::UserMetricsAction;
30 30
31 namespace options { 31 namespace options {
32 32
33 LanguageOptionsHandler::LanguageOptionsHandler() { 33 LanguageOptionsHandler::LanguageOptionsHandler() {
34 } 34 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 PrefService* pref_service = g_browser_process->local_state(); 119 PrefService* pref_service = g_browser_process->local_state();
120 pref_service->SetString(prefs::kApplicationLocale, language_code); 120 pref_service->SetString(prefs::kApplicationLocale, language_code);
121 } 121 }
122 122
123 void LanguageOptionsHandler::RestartCallback(const base::ListValue* args) { 123 void LanguageOptionsHandler::RestartCallback(const base::ListValue* args) {
124 content::RecordAction(UserMetricsAction("LanguageOptions_Restart")); 124 content::RecordAction(UserMetricsAction("LanguageOptions_Restart"));
125 chrome::AttemptRestart(); 125 chrome::AttemptRestart();
126 } 126 }
127 127
128 } // namespace options 128 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698