OLD | NEW |
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 "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/chromeos/first_run/first_run.h" | 8 #include "chrome/browser/chromeos/first_run/first_run.h" |
9 #include "chrome/browser/chromeos/login/user_manager.h" | 9 #include "chrome/browser/chromeos/login/user_manager.h" |
10 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
12 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
13 #include "ui/base/webui/web_ui_util.h" | 13 #include "ui/base/webui/web_ui_util.h" |
14 | 14 |
15 bool FirstRunPrivateGetLocalizedStringsFunction::RunImpl() { | 15 bool FirstRunPrivateGetLocalizedStringsFunction::RunImpl() { |
16 DictionaryValue* localized_strings = new DictionaryValue(); | 16 base::DictionaryValue* localized_strings = new base::DictionaryValue(); |
17 chromeos::User* user = | 17 chromeos::User* user = |
18 chromeos::UserManager::Get()->GetUserByProfile(GetProfile()); | 18 chromeos::UserManager::Get()->GetUserByProfile(GetProfile()); |
19 if (!user->given_name().empty()) { | 19 if (!user->given_name().empty()) { |
20 localized_strings->SetString( | 20 localized_strings->SetString( |
21 "greetingHeader", | 21 "greetingHeader", |
22 l10n_util::GetStringFUTF16(IDS_FIRST_RUN_GREETING_STEP_HEADER, | 22 l10n_util::GetStringFUTF16(IDS_FIRST_RUN_GREETING_STEP_HEADER, |
23 user->given_name())); | 23 user->given_name())); |
24 } else { | 24 } else { |
25 localized_strings->SetString( | 25 localized_strings->SetString( |
26 "greetingHeader", | 26 "greetingHeader", |
(...skipping 13 matching lines...) Expand all Loading... |
40 l10n_util::GetStringUTF16(IDS_CLOSE)); | 40 l10n_util::GetStringUTF16(IDS_CLOSE)); |
41 webui::SetFontAndTextDirection(localized_strings); | 41 webui::SetFontAndTextDirection(localized_strings); |
42 SetResult(localized_strings); | 42 SetResult(localized_strings); |
43 return true; | 43 return true; |
44 } | 44 } |
45 | 45 |
46 bool FirstRunPrivateLaunchTutorialFunction::RunImpl() { | 46 bool FirstRunPrivateLaunchTutorialFunction::RunImpl() { |
47 chromeos::first_run::LaunchTutorial(); | 47 chromeos::first_run::LaunchTutorial(); |
48 return true; | 48 return true; |
49 } | 49 } |
OLD | NEW |