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

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

Issue 2112006: Cleaned up some constants for stats reading (Closed)
Patch Set: Review mods Created 10 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/browser_notification_observers.cc ('k') | 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"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 void BackgroundView::InitStatusArea() { 153 void BackgroundView::InitStatusArea() {
154 DCHECK(status_area_ == NULL); 154 DCHECK(status_area_ == NULL);
155 status_area_ = new StatusAreaView(this); 155 status_area_ = new StatusAreaView(this);
156 status_area_->Init(); 156 status_area_->Init();
157 AddChildView(status_area_); 157 AddChildView(status_area_);
158 } 158 }
159 159
160 void BackgroundView::InitInfoLabels() { 160 void BackgroundView::InitInfoLabels() {
161 const SkColor kVersionColor = 0xFFFFFFFF; 161 const SkColor kVersionColor = 0xff8eb1f4;
162 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 162 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
163 163
164 os_version_label_ = new views::Label(); 164 os_version_label_ = new views::Label();
165 os_version_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 165 os_version_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
166 os_version_label_->SetColor(kVersionColor); 166 os_version_label_->SetColor(kVersionColor);
167 os_version_label_->SetFont(rb.GetFont(ResourceBundle::MediumFont)); 167 os_version_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont));
168 AddChildView(os_version_label_); 168 AddChildView(os_version_label_);
169 boot_times_label_ = new views::Label(); 169 boot_times_label_ = new views::Label();
170 boot_times_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 170 boot_times_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
171 boot_times_label_->SetColor(kVersionColor); 171 boot_times_label_->SetColor(kVersionColor);
172 boot_times_label_->SetFont(rb.GetFont(ResourceBundle::MediumFont)); 172 boot_times_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont));
173 AddChildView(boot_times_label_); 173 AddChildView(boot_times_label_);
174 174
175 if (CrosLibrary::Get()->EnsureLoaded()) { 175 if (CrosLibrary::Get()->EnsureLoaded()) {
176 version_loader_.GetVersion( 176 version_loader_.GetVersion(
177 &version_consumer_, NewCallback(this, &BackgroundView::OnVersion)); 177 &version_consumer_, NewCallback(this, &BackgroundView::OnVersion));
178 boot_times_loader_.GetBootTimes( 178 boot_times_loader_.GetBootTimes(
179 &boot_times_consumer_, NewCallback(this, &BackgroundView::OnBootTimes)); 179 &boot_times_consumer_, NewCallback(this, &BackgroundView::OnBootTimes));
180 } else { 180 } else {
181 os_version_label_->SetText( 181 os_version_label_->SetText(
182 ASCIIToWide(CrosLibrary::Get()->load_error_string())); 182 ASCIIToWide(CrosLibrary::Get()->load_error_string()));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 kBootTimesNoChromeExec, 228 kBootTimesNoChromeExec,
229 boot_times.firmware + boot_times.login_prompt_ready, 229 boot_times.firmware + boot_times.login_prompt_ready,
230 boot_times.firmware, 230 boot_times.firmware,
231 boot_times.pre_startup, 231 boot_times.pre_startup,
232 boot_times.login_prompt_ready - boot_times.pre_startup); 232 boot_times.login_prompt_ready - boot_times.pre_startup);
233 } 233 }
234 boot_times_label_->SetText(ASCIIToWide(boot_times_text)); 234 boot_times_label_->SetText(ASCIIToWide(boot_times_text));
235 } 235 }
236 236
237 } // namespace chromeos 237 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/browser_notification_observers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698