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

Side by Side Diff: chrome/browser/chromeos/login/background_view.cc

Issue 2864033: Make the localized product name 'ungarbled'. ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/login/background_view.h" 5 #include "chrome/browser/chromeos/login/background_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "app/x11_util.h" 9 #include "app/x11_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/chromeos/login/helper.h" 12 #include "chrome/browser/chromeos/login/helper.h"
12 #include "chrome/browser/chromeos/status/clock_menu_button.h" 13 #include "chrome/browser/chromeos/status/clock_menu_button.h"
13 #include "chrome/browser/chromeos/status/feedback_menu_button.h" 14 #include "chrome/browser/chromeos/status/feedback_menu_button.h"
14 #include "chrome/browser/chromeos/status/language_menu_button.h" 15 #include "chrome/browser/chromeos/status/language_menu_button.h"
15 #include "chrome/browser/chromeos/status/network_menu_button.h" 16 #include "chrome/browser/chromeos/status/network_menu_button.h"
16 #include "chrome/browser/chromeos/status/status_area_view.h" 17 #include "chrome/browser/chromeos/status/status_area_view.h"
17 #include "chrome/browser/chromeos/wm_ipc.h" 18 #include "chrome/browser/chromeos/wm_ipc.h"
18 #include "third_party/cros/chromeos_wm_ipc_enums.h" 19 #include "third_party/cros/chromeos_wm_ipc_enums.h"
19 #include "grit/chromium_strings.h" 20 #include "grit/chromium_strings.h"
20 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 std::vector<int> params; 196 std::vector<int> params;
196 params.push_back(did_paint_ ? 1 : 0); 197 params.push_back(did_paint_ ? 1 : 0);
197 WmIpc::instance()->SetWindowType( 198 WmIpc::instance()->SetWindowType(
198 GTK_WIDGET(GetNativeWindow()), 199 GTK_WIDGET(GetNativeWindow()),
199 WM_IPC_WINDOW_LOGIN_BACKGROUND, 200 WM_IPC_WINDOW_LOGIN_BACKGROUND,
200 &params); 201 &params);
201 } 202 }
202 203
203 void BackgroundView::OnVersion( 204 void BackgroundView::OnVersion(
204 VersionLoader::Handle handle, std::string version) { 205 VersionLoader::Handle handle, std::string version) {
206 // TODO(jungshik): Is string concatenation OK here?
205 std::string version_text = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); 207 std::string version_text = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME);
206 version_text += ' '; 208 version_text += ' ';
207 version_text += l10n_util::GetStringUTF8(IDS_VERSION_FIELD_PREFIX); 209 version_text += l10n_util::GetStringUTF8(IDS_VERSION_FIELD_PREFIX);
208 version_text += ' '; 210 version_text += ' ';
209 version_text += version; 211 version_text += version;
210 os_version_label_->SetText(ASCIIToWide(version_text)); 212 os_version_label_->SetText(UTF8ToWide(version_text));
211 } 213 }
212 214
213 void BackgroundView::OnBootTimes( 215 void BackgroundView::OnBootTimes(
214 BootTimesLoader::Handle handle, BootTimesLoader::BootTimes boot_times) { 216 BootTimesLoader::Handle handle, BootTimesLoader::BootTimes boot_times) {
215 // TODO(davemoore) if we decide to keep these times visible we will need 217 // TODO(davemoore) if we decide to keep these times visible we will need
216 // to localize the strings. 218 // to localize the strings.
217 const char* kBootTimesNoChromeExec = 219 const char* kBootTimesNoChromeExec =
218 "Boot took %.2f seconds (firmware %.2fs, kernel %.2fs, system %.2fs)"; 220 "Boot took %.2f seconds (firmware %.2fs, kernel %.2fs, system %.2fs)";
219 const char* kBootTimesChromeExec = 221 const char* kBootTimesChromeExec =
220 "Boot took %.2f seconds " 222 "Boot took %.2f seconds "
(...skipping 11 matching lines...) Expand all
232 boot_times.chrome); 234 boot_times.chrome);
233 } else { 235 } else {
234 boot_times_text = 236 boot_times_text =
235 StringPrintf( 237 StringPrintf(
236 kBootTimesNoChromeExec, 238 kBootTimesNoChromeExec,
237 boot_times.total, 239 boot_times.total,
238 boot_times.firmware, 240 boot_times.firmware,
239 boot_times.pre_startup, 241 boot_times.pre_startup,
240 boot_times.system); 242 boot_times.system);
241 } 243 }
244 // Use UTF8ToWide once this string is loclized.
tfarina 2010/07/12 16:28:35 nit: localized
242 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); 245 boot_times_label_->SetText(ASCIIToWide(boot_times_text));
243 } 246 }
244 247
245 } // namespace chromeos 248 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698