OLD | NEW |
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/chromeos/login/update_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 show_on_init_(false) { | 27 show_on_init_(false) { |
28 } | 28 } |
29 | 29 |
30 UpdateScreenHandler::~UpdateScreenHandler() { | 30 UpdateScreenHandler::~UpdateScreenHandler() { |
31 if (screen_) | 31 if (screen_) |
32 screen_->OnActorDestroyed(this); | 32 screen_->OnActorDestroyed(this); |
33 } | 33 } |
34 | 34 |
35 void UpdateScreenHandler::GetLocalizedStrings( | 35 void UpdateScreenHandler::GetLocalizedStrings( |
36 DictionaryValue *localized_strings) { | 36 DictionaryValue *localized_strings) { |
| 37 const string16 short_product_name = |
| 38 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); |
| 39 localized_strings->SetString("checkingForUpdatesMsg", |
| 40 l10n_util::GetStringFUTF16(IDS_CHECKING_FOR_UPDATE_MSG, |
| 41 short_product_name)); |
37 localized_strings->SetString("updateScreenTitle", | 42 localized_strings->SetString("updateScreenTitle", |
38 l10n_util::GetStringUTF16(IDS_UPDATE_SCREEN_TITLE)); | 43 l10n_util::GetStringUTF16(IDS_UPDATE_SCREEN_TITLE)); |
39 localized_strings->SetString("checkingForUpdates", | 44 localized_strings->SetString("checkingForUpdates", |
40 l10n_util::GetStringUTF16(IDS_CHECKING_FOR_UPDATES)); | 45 l10n_util::GetStringUTF16(IDS_CHECKING_FOR_UPDATES)); |
41 localized_strings->SetString("installingUpdateDesc", | 46 localized_strings->SetString("installingUpdateDesc", |
42 l10n_util::GetStringUTF16(IDS_INSTALLING_UPDATE_DESC)); | 47 l10n_util::GetStringFUTF16(IDS_UPDATE_MSG, |
| 48 short_product_name, short_product_name)); |
43 localized_strings->SetString("downloadingTimeLeftLong", | 49 localized_strings->SetString("downloadingTimeLeftLong", |
44 l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_LONG)); | 50 l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_LONG)); |
45 localized_strings->SetString("downloadingTimeLeftStatusOneHour", | 51 localized_strings->SetString("downloadingTimeLeftStatusOneHour", |
46 l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_STATUS_ONE_HOUR)); | 52 l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_STATUS_ONE_HOUR)); |
47 localized_strings->SetString("downloadingTimeLeftStatusMinutes", | 53 localized_strings->SetString("downloadingTimeLeftStatusMinutes", |
48 l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_STATUS_MINUTES)); | 54 l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_STATUS_MINUTES)); |
49 localized_strings->SetString("downloadingTimeLeftSmall", | 55 localized_strings->SetString("downloadingTimeLeftSmall", |
50 l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_SMALL)); | 56 l10n_util::GetStringUTF16(IDS_DOWNLOADING_TIME_LEFT_SMALL)); |
51 #if !defined(OFFICIAL_BUILD) | 57 #if !defined(OFFICIAL_BUILD) |
52 localized_strings->SetString("cancelUpdateHint", | 58 localized_strings->SetString("cancelUpdateHint", |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 142 } |
137 | 143 |
138 #if !defined(OFFICIAL_BUILD) | 144 #if !defined(OFFICIAL_BUILD) |
139 void UpdateScreenHandler::HandleUpdateCancel(const base::ListValue* args) { | 145 void UpdateScreenHandler::HandleUpdateCancel(const base::ListValue* args) { |
140 DCHECK(args && args->empty()); | 146 DCHECK(args && args->empty()); |
141 screen_->CancelUpdate(); | 147 screen_->CancelUpdate(); |
142 } | 148 } |
143 #endif | 149 #endif |
144 | 150 |
145 } // namespace chromeos | 151 } // namespace chromeos |
OLD | NEW |