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

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

Issue 8588006: Eliminate CrosLibrary::EnsureLoaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/network_screen.h" 5 #include "chrome/browser/chromeos/login/network_screen.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // NetworkScreen, NetworkLibrary::NetworkManagerObserver implementation: 64 // NetworkScreen, NetworkLibrary::NetworkManagerObserver implementation:
65 65
66 void NetworkScreen::OnNetworkManagerChanged(NetworkLibrary* network_lib) { 66 void NetworkScreen::OnNetworkManagerChanged(NetworkLibrary* network_lib) {
67 UpdateStatus(network_lib); 67 UpdateStatus(network_lib);
68 } 68 }
69 69
70 //////////////////////////////////////////////////////////////////////////////// 70 ////////////////////////////////////////////////////////////////////////////////
71 // NetworkScreen, public: 71 // NetworkScreen, public:
72 72
73 void NetworkScreen::Refresh() { 73 void NetworkScreen::Refresh() {
74 if (CrosLibrary::Get()->EnsureLoaded()) { 74 SubscribeNetworkNotification();
75 SubscribeNetworkNotification(); 75 OnNetworkManagerChanged(chromeos::CrosLibrary::Get()->GetNetworkLibrary());
76 OnNetworkManagerChanged(chromeos::CrosLibrary::Get()->GetNetworkLibrary());
77 }
78 } 76 }
79 77
80 /////////////////////////////////////////////////////////////////////////////// 78 ///////////////////////////////////////////////////////////////////////////////
81 // NetworkScreen, NetworkScreenActor::Delegate implementation: 79 // NetworkScreen, NetworkScreenActor::Delegate implementation:
82 80
83 void NetworkScreen::OnContinuePressed() { 81 void NetworkScreen::OnContinuePressed() {
84 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary(); 82 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary();
85 if (network && network->Connected()) { 83 if (network && network->Connected()) {
86 NotifyOnConnection(); 84 NotifyOnConnection();
87 } else { 85 } else {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 &NetworkScreen::OnConnectionTimeout); 171 &NetworkScreen::OnConnectionTimeout);
174 } 172 }
175 173
176 network_id_ = network_id; 174 network_id_ = network_id;
177 actor_->ShowConnectingStatus(continue_pressed_, network_id_); 175 actor_->ShowConnectingStatus(continue_pressed_, network_id_);
178 176
179 actor_->EnableContinue(false); 177 actor_->EnableContinue(false);
180 } 178 }
181 179
182 } // namespace chromeos 180 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/online_attempt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698