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

Side by Side Diff: apps/shell/browser/shell_network_controller_chromeos.cc

Issue 289383004: Merge FavoriteState into NetworkState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/system/chromeos/network/network_icon.h » ('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 "apps/shell/browser/shell_network_controller_chromeos.h" 5 #include "apps/shell/browser/shell_network_controller_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Attempts to connect to an available network if not already connecting or 119 // Attempts to connect to an available network if not already connecting or
120 // connected. 120 // connected.
121 void ShellNetworkController::ConnectIfUnconnected() { 121 void ShellNetworkController::ConnectIfUnconnected() {
122 chromeos::NetworkHandler* handler = chromeos::NetworkHandler::Get(); 122 chromeos::NetworkHandler* handler = chromeos::NetworkHandler::Get();
123 DCHECK(handler); 123 DCHECK(handler);
124 if (waiting_for_connection_result_ || IsConnectedOrConnecting()) 124 if (waiting_for_connection_result_ || IsConnectedOrConnecting())
125 return; 125 return;
126 126
127 chromeos::NetworkStateHandler::NetworkStateList state_list; 127 chromeos::NetworkStateHandler::NetworkStateList state_list;
128 handler->network_state_handler()->GetNetworkListByType( 128 handler->network_state_handler()->GetVisibleNetworkListByType(
129 chromeos::NetworkTypePattern::WiFi(), &state_list); 129 chromeos::NetworkTypePattern::WiFi(), &state_list);
130 for (chromeos::NetworkStateHandler::NetworkStateList::const_iterator it = 130 for (chromeos::NetworkStateHandler::NetworkStateList::const_iterator it =
131 state_list.begin(); it != state_list.end(); ++it) { 131 state_list.begin(); it != state_list.end(); ++it) {
132 const chromeos::NetworkState* state = *it; 132 const chromeos::NetworkState* state = *it;
133 DCHECK(state); 133 DCHECK(state);
134 if (!state->connectable()) 134 if (!state->connectable())
135 continue; 135 continue;
136 136
137 VLOG(1) << "Connecting to network " << GetNetworkName(*state) 137 VLOG(1) << "Connecting to network " << GetNetworkName(*state)
138 << " with path " << state->path() << " and strength " 138 << " with path " << state->path() << " and strength "
(...skipping 19 matching lines...) Expand all
158 } 158 }
159 159
160 void ShellNetworkController::HandleConnectionError( 160 void ShellNetworkController::HandleConnectionError(
161 const std::string& error_name, 161 const std::string& error_name,
162 scoped_ptr<base::DictionaryValue> error_data) { 162 scoped_ptr<base::DictionaryValue> error_data) {
163 LOG(WARNING) << "Unable to connect to network: " << error_name; 163 LOG(WARNING) << "Unable to connect to network: " << error_name;
164 waiting_for_connection_result_ = false; 164 waiting_for_connection_result_ = false;
165 } 165 }
166 166
167 } // namespace apps 167 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | ash/system/chromeos/network/network_icon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698