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

Side by Side Diff: chrome/browser/chromeos/locale_change_guard.cc

Issue 105193002: Replace string16 with base::string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 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/chromeos/locale_change_guard.h" 5 #include "chrome/browser/chromeos/locale_change_guard.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_notifier.h" 9 #include "ash/system/tray/system_tray_notifier.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 void LocaleChangeGuard::PrepareChangingLocale( 213 void LocaleChangeGuard::PrepareChangingLocale(
214 const std::string& from_locale, const std::string& to_locale) { 214 const std::string& from_locale, const std::string& to_locale) {
215 std::string cur_locale = g_browser_process->GetApplicationLocale(); 215 std::string cur_locale = g_browser_process->GetApplicationLocale();
216 if (!from_locale.empty()) 216 if (!from_locale.empty())
217 from_locale_ = from_locale; 217 from_locale_ = from_locale;
218 if (!to_locale.empty()) 218 if (!to_locale.empty())
219 to_locale_ = to_locale; 219 to_locale_ = to_locale;
220 220
221 if (!from_locale_.empty() && !to_locale_.empty()) { 221 if (!from_locale_.empty() && !to_locale_.empty()) {
222 string16 from = l10n_util::GetDisplayNameForLocale( 222 base::string16 from = l10n_util::GetDisplayNameForLocale(
223 from_locale_, cur_locale, true); 223 from_locale_, cur_locale, true);
224 string16 to = l10n_util::GetDisplayNameForLocale( 224 base::string16 to = l10n_util::GetDisplayNameForLocale(
225 to_locale_, cur_locale, true); 225 to_locale_, cur_locale, true);
226 226
227 title_text_ = l10n_util::GetStringUTF16( 227 title_text_ = l10n_util::GetStringUTF16(
228 IDS_OPTIONS_SETTINGS_SECTION_TITLE_LANGUAGE); 228 IDS_OPTIONS_SETTINGS_SECTION_TITLE_LANGUAGE);
229 message_text_ = l10n_util::GetStringFUTF16( 229 message_text_ = l10n_util::GetStringFUTF16(
230 IDS_LOCALE_CHANGE_MESSAGE, from, to); 230 IDS_LOCALE_CHANGE_MESSAGE, from, to);
231 revert_link_text_ = l10n_util::GetStringFUTF16( 231 revert_link_text_ = l10n_util::GetStringFUTF16(
232 IDS_LOCALE_CHANGE_REVERT_MESSAGE, from); 232 IDS_LOCALE_CHANGE_REVERT_MESSAGE, from);
233 } 233 }
234 } 234 }
235 235
236 void LocaleChangeGuard::Delegate::Close(bool by_user) { 236 void LocaleChangeGuard::Delegate::Close(bool by_user) {
237 if (by_user) 237 if (by_user)
238 master_->AcceptLocaleChange(); 238 master_->AcceptLocaleChange();
239 } 239 }
240 240
241 std::string LocaleChangeGuard::Delegate::id() const { 241 std::string LocaleChangeGuard::Delegate::id() const {
242 // Arbitrary unique Id. 242 // Arbitrary unique Id.
243 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5"; 243 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5";
244 } 244 }
245 245
246 } // namespace chromeos 246 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/locale_change_guard.h ('k') | chrome/browser/chromeos/login/captive_portal_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698