| OLD | NEW |
| 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" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 &boot_times_consumer_, NewCallback(this, &BackgroundView::OnBootTimes)); | 194 &boot_times_consumer_, NewCallback(this, &BackgroundView::OnBootTimes)); |
| 195 } else { | 195 } else { |
| 196 os_version_label_->SetText( | 196 os_version_label_->SetText( |
| 197 ASCIIToWide(CrosLibrary::Get()->load_error_string())); | 197 ASCIIToWide(CrosLibrary::Get()->load_error_string())); |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 void BackgroundView::InitProgressBar() { | 201 void BackgroundView::InitProgressBar() { |
| 202 std::vector<int> steps; | 202 std::vector<int> steps; |
| 203 steps.push_back(IDS_OOBE_SELECT_NETWORK); | 203 steps.push_back(IDS_OOBE_SELECT_NETWORK); |
| 204 #if defined(OFFICIAL_BUILD) |
| 204 steps.push_back(IDS_OOBE_EULA); | 205 steps.push_back(IDS_OOBE_EULA); |
| 206 #endif |
| 205 steps.push_back(IDS_OOBE_SIGNIN); | 207 steps.push_back(IDS_OOBE_SIGNIN); |
| 208 #if defined(OFFICIAL_BUILD) |
| 206 steps.push_back(IDS_OOBE_REGISTRATION); | 209 steps.push_back(IDS_OOBE_REGISTRATION); |
| 210 #endif |
| 207 steps.push_back(IDS_OOBE_PICTURE); | 211 steps.push_back(IDS_OOBE_PICTURE); |
| 208 progress_bar_ = new OobeProgressBar(steps); | 212 progress_bar_ = new OobeProgressBar(steps); |
| 209 AddChildView(progress_bar_); | 213 AddChildView(progress_bar_); |
| 210 } | 214 } |
| 211 | 215 |
| 212 void BackgroundView::SetOobeProgressBarVisible(bool visible) { | 216 void BackgroundView::SetOobeProgressBarVisible(bool visible) { |
| 213 if (!progress_bar_ && visible) | 217 if (!progress_bar_ && visible) |
| 214 InitProgressBar(); | 218 InitProgressBar(); |
| 215 | 219 |
| 216 if (progress_bar_) | 220 if (progress_bar_) |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 boot_times.total, | 274 boot_times.total, |
| 271 boot_times.firmware, | 275 boot_times.firmware, |
| 272 boot_times.pre_startup, | 276 boot_times.pre_startup, |
| 273 boot_times.system); | 277 boot_times.system); |
| 274 } | 278 } |
| 275 // Use UTF8ToWide once this string is localized. | 279 // Use UTF8ToWide once this string is localized. |
| 276 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); | 280 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); |
| 277 } | 281 } |
| 278 | 282 |
| 279 } // namespace chromeos | 283 } // namespace chromeos |
| OLD | NEW |