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

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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()->GetNetworkListByType(
129 chromeos::NetworkTypePattern::WiFi(), &state_list); 129 chromeos::NetworkTypePattern::WiFi(),
130 false /* configured_only */,
131 true /* visible_only */,
132 0 /* no limit */,
133 &state_list);
130 for (chromeos::NetworkStateHandler::NetworkStateList::const_iterator it = 134 for (chromeos::NetworkStateHandler::NetworkStateList::const_iterator it =
131 state_list.begin(); it != state_list.end(); ++it) { 135 state_list.begin(); it != state_list.end(); ++it) {
132 const chromeos::NetworkState* state = *it; 136 const chromeos::NetworkState* state = *it;
133 DCHECK(state); 137 DCHECK(state);
134 if (!state->connectable()) 138 if (!state->connectable())
135 continue; 139 continue;
136 140
137 VLOG(1) << "Connecting to network " << GetNetworkName(*state) 141 VLOG(1) << "Connecting to network " << GetNetworkName(*state)
138 << " with path " << state->path() << " and strength " 142 << " with path " << state->path() << " and strength "
139 << state->signal_strength(); 143 << state->signal_strength();
(...skipping 18 matching lines...) Expand all
158 } 162 }
159 163
160 void ShellNetworkController::HandleConnectionError( 164 void ShellNetworkController::HandleConnectionError(
161 const std::string& error_name, 165 const std::string& error_name,
162 scoped_ptr<base::DictionaryValue> error_data) { 166 scoped_ptr<base::DictionaryValue> error_data) {
163 LOG(WARNING) << "Unable to connect to network: " << error_name; 167 LOG(WARNING) << "Unable to connect to network: " << error_name;
164 waiting_for_connection_result_ = false; 168 waiting_for_connection_result_ = false;
165 } 169 }
166 170
167 } // namespace apps 171 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | ash/system/chromeos/network/network_icon.cc » ('j') | chromeos/dbus/shill_device_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698