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

Side by Side Diff: chrome/browser/chromeos/extensions/first_run_private_api.cc

Issue 216793004: Changed strings for first-run UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/first_run_private_api.h" 5 #include "chrome/browser/chromeos/extensions/first_run_private_api.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/first_run/first_run.h" 9 #include "chrome/browser/chromeos/first_run/first_run.h"
10 #include "chrome/browser/chromeos/login/user_manager.h" 10 #include "chrome/browser/chromeos/login/user_manager.h"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "grit/chromium_strings.h"
12 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
13 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
14 #include "ui/base/webui/web_ui_util.h" 15 #include "ui/base/webui/web_ui_util.h"
15 16
16 bool FirstRunPrivateGetLocalizedStringsFunction::RunImpl() { 17 bool FirstRunPrivateGetLocalizedStringsFunction::RunImpl() {
17 UMA_HISTOGRAM_COUNTS("CrosFirstRun.DialogShown", 1); 18 UMA_HISTOGRAM_COUNTS("CrosFirstRun.DialogShown", 1);
18 base::DictionaryValue* localized_strings = new base::DictionaryValue(); 19 base::DictionaryValue* localized_strings = new base::DictionaryValue();
19 chromeos::User* user = 20 chromeos::User* user =
20 chromeos::UserManager::Get()->GetUserByProfile(GetProfile()); 21 chromeos::UserManager::Get()->GetUserByProfile(GetProfile());
21 if (!user->given_name().empty()) { 22 if (!user->given_name().empty()) {
22 localized_strings->SetString( 23 localized_strings->SetString(
23 "greetingHeader", 24 "greetingHeader",
24 l10n_util::GetStringFUTF16(IDS_FIRST_RUN_GREETING_STEP_HEADER, 25 l10n_util::GetStringFUTF16(IDS_FIRST_RUN_GREETING_STEP_HEADER,
25 user->given_name())); 26 user->given_name()));
26 } else { 27 } else {
27 localized_strings->SetString( 28 localized_strings->SetString(
28 "greetingHeader", 29 "greetingHeader",
29 l10n_util::GetStringUTF16(IDS_FIRST_RUN_GREETING_STEP_HEADER_GENERAL)); 30 l10n_util::GetStringUTF16(IDS_FIRST_RUN_GREETING_STEP_HEADER_GENERAL));
30 } 31 }
32 base::string16 product_name =
33 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
31 localized_strings->SetString( 34 localized_strings->SetString(
32 "greetingText1", 35 "greetingText1",
33 l10n_util::GetStringUTF16(IDS_FIRST_RUN_GREETING_STEP_TEXT_1)); 36 l10n_util::GetStringFUTF16(IDS_FIRST_RUN_GREETING_STEP_TEXT_1,
37 product_name));
34 localized_strings->SetString( 38 localized_strings->SetString(
35 "greetingText2", 39 "greetingText2",
36 l10n_util::GetStringUTF16(IDS_FIRST_RUN_GREETING_STEP_TEXT_2)); 40 l10n_util::GetStringFUTF16(IDS_FIRST_RUN_GREETING_STEP_TEXT_2,
41 product_name));
37 localized_strings->SetString( 42 localized_strings->SetString(
38 "greetingButton", 43 "greetingButton",
39 l10n_util::GetStringUTF16(IDS_FIRST_RUN_GREETING_STEP_BUTTON)); 44 l10n_util::GetStringUTF16(IDS_FIRST_RUN_GREETING_STEP_BUTTON));
40 localized_strings->SetString( 45 localized_strings->SetString(
41 "closeButton", 46 "closeButton",
42 l10n_util::GetStringUTF16(IDS_CLOSE)); 47 l10n_util::GetStringUTF16(IDS_CLOSE));
43 webui::SetFontAndTextDirection(localized_strings); 48 webui::SetFontAndTextDirection(localized_strings);
44 SetResult(localized_strings); 49 SetResult(localized_strings);
45 return true; 50 return true;
46 } 51 }
47 52
48 bool FirstRunPrivateLaunchTutorialFunction::RunImpl() { 53 bool FirstRunPrivateLaunchTutorialFunction::RunImpl() {
49 chromeos::first_run::LaunchTutorial(); 54 chromeos::first_run::LaunchTutorial();
50 return true; 55 return true;
51 } 56 }
OLDNEW
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698