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

Side by Side Diff: athena/system/status_icon_container_view.cc

Issue 653853004: athena: Avoid initializaing chromeos::Network for tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | athena/test/base/athena_test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/system/status_icon_container_view.h" 5 #include "athena/system/status_icon_container_view.h"
6 6
7 #include "athena/resources/athena_resources.h" 7 #include "athena/resources/athena_resources.h"
8 #include "athena/system/network_selector.h" 8 #include "athena/system/network_selector.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 kVerticalSpacing, 219 kVerticalSpacing,
220 kBetweenChildSpacing)); 220 kBetweenChildSpacing));
221 221
222 std::string version_text = 222 std::string version_text =
223 base::StringPrintf("%s (Build %s)", PRODUCT_VERSION, LAST_CHANGE); 223 base::StringPrintf("%s (Build %s)", PRODUCT_VERSION, LAST_CHANGE);
224 AddChildView(CreateLabel(color_scheme, version_text)); 224 AddChildView(CreateLabel(color_scheme, version_text));
225 225
226 AddChildView(CreateLabel(color_scheme, "Network:")); 226 AddChildView(CreateLabel(color_scheme, "Network:"));
227 views::Label* network_label = CreateLabel(color_scheme, std::string()); 227 views::Label* network_label = CreateLabel(color_scheme, std::string());
228 AddChildView(network_label); 228 AddChildView(network_label);
229 network_status_.reset(new NetworkStatus(network_label)); 229 if (chromeos::NetworkHandler::IsInitialized())
230 network_status_.reset(new NetworkStatus(network_label));
230 231
231 views::ImageView* battery_view = new views::ImageView(); 232 views::ImageView* battery_view = new views::ImageView();
232 AddChildView(battery_view); 233 AddChildView(battery_view);
233 power_status_.reset(new PowerStatus(color_scheme, battery_view)); 234 power_status_.reset(new PowerStatus(color_scheme, battery_view));
234 235
235 views::ImageView* update_view = new views::ImageView(); 236 views::ImageView* update_view = new views::ImageView();
236 AddChildView(update_view); 237 AddChildView(update_view);
237 update_status_.reset(new UpdateStatus(color_scheme, update_view)); 238 update_status_.reset(new UpdateStatus(color_scheme, update_view));
238 } 239 }
239 240
(...skipping 10 matching lines...) Expand all
250 CreateNetworkSelector(system_modal_container_); 251 CreateNetworkSelector(system_modal_container_);
251 event->SetHandled(); 252 event->SetHandled();
252 } 253 }
253 } 254 }
254 255
255 void StatusIconContainerView::ChildPreferredSizeChanged(views::View* child) { 256 void StatusIconContainerView::ChildPreferredSizeChanged(views::View* child) {
256 PreferredSizeChanged(); 257 PreferredSizeChanged();
257 } 258 }
258 259
259 } // namespace athena 260 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | athena/test/base/athena_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698