OLD | NEW |
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 "extensions/shell/browser/shell_network_controller_chromeos.h" | 5 #include "extensions/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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 scan_timer_.Stop(); | 129 scan_timer_.Stop(); |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 void ShellNetworkController::RequestScan() { | 133 void ShellNetworkController::RequestScan() { |
134 VLOG(1) << "Requesting scan"; | 134 VLOG(1) << "Requesting scan"; |
135 chromeos::NetworkHandler::Get()->network_state_handler()->RequestScan(); | 135 chromeos::NetworkHandler::Get()->network_state_handler()->RequestScan(); |
136 } | 136 } |
137 | 137 |
138 void ShellNetworkController::ConnectIfUnconnected() { | 138 void ShellNetworkController::ConnectIfUnconnected() { |
| 139 LOG(ERROR) << "*** QUICHE: " << __func__; |
139 // Don't do anything if the default network is already the preferred one or if | 140 // Don't do anything if the default network is already the preferred one or if |
140 // we have a pending request to connect to it. | 141 // we have a pending request to connect to it. |
141 if (preferred_network_is_active_ || | 142 if (preferred_network_is_active_ || |
142 state_ == STATE_WAITING_FOR_PREFERRED_RESULT) | 143 state_ == STATE_WAITING_FOR_PREFERRED_RESULT) |
143 return; | 144 return; |
144 | 145 |
145 const chromeos::NetworkState* best_network = NULL; | 146 const chromeos::NetworkState* best_network = NULL; |
146 bool can_connect_to_preferred_network = false; | 147 bool can_connect_to_preferred_network = false; |
147 | 148 |
148 chromeos::NetworkHandler* handler = chromeos::NetworkHandler::Get(); | 149 chromeos::NetworkHandler* handler = chromeos::NetworkHandler::Get(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } | 200 } |
200 | 201 |
201 void ShellNetworkController::HandleConnectionError( | 202 void ShellNetworkController::HandleConnectionError( |
202 const std::string& error_name, | 203 const std::string& error_name, |
203 scoped_ptr<base::DictionaryValue> error_data) { | 204 scoped_ptr<base::DictionaryValue> error_data) { |
204 LOG(WARNING) << "Unable to connect to network: " << error_name; | 205 LOG(WARNING) << "Unable to connect to network: " << error_name; |
205 state_ = STATE_IDLE; | 206 state_ = STATE_IDLE; |
206 } | 207 } |
207 | 208 |
208 } // namespace extensions | 209 } // namespace extensions |
OLD | NEW |