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

Side by Side Diff: chromeos/network/network_state_handler.cc

Issue 13845023: Correctly set technology state to UNAVAILABLE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TexchnologyState unit test Created 7 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/network/network_state_handler.h" 5 #include "chromeos/network/network_state_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 TechnologyState state; 136 TechnologyState state;
137 if (shill_property_handler_->IsTechnologyEnabled(technology)) 137 if (shill_property_handler_->IsTechnologyEnabled(technology))
138 state = TECHNOLOGY_ENABLED; 138 state = TECHNOLOGY_ENABLED;
139 else if (shill_property_handler_->IsTechnologyEnabling(technology)) 139 else if (shill_property_handler_->IsTechnologyEnabling(technology))
140 state = TECHNOLOGY_ENABLING; 140 state = TECHNOLOGY_ENABLING;
141 else if (shill_property_handler_->IsTechnologyUninitialized(technology)) 141 else if (shill_property_handler_->IsTechnologyUninitialized(technology))
142 state = TECHNOLOGY_UNINITIALIZED; 142 state = TECHNOLOGY_UNINITIALIZED;
143 else if (shill_property_handler_->IsTechnologyAvailable(technology)) 143 else if (shill_property_handler_->IsTechnologyAvailable(technology))
144 state = TECHNOLOGY_AVAILABLE; 144 state = TECHNOLOGY_AVAILABLE;
145 else 145 else
146 state = TECHNOLOGY_UNINITIALIZED; 146 state = TECHNOLOGY_UNAVAILABLE;
147 VLOG(2) << "GetTechnologyState: " << type << " = " << state; 147 VLOG(2) << "GetTechnologyState: " << type << " = " << state;
148 return state; 148 return state;
149 } 149 }
150 150
151 void NetworkStateHandler::SetTechnologyEnabled( 151 void NetworkStateHandler::SetTechnologyEnabled(
152 const std::string& type, 152 const std::string& type,
153 bool enabled, 153 bool enabled,
154 const network_handler::ErrorCallback& error_callback) { 154 const network_handler::ErrorCallback& error_callback) {
155 std::string technology = GetTechnologyForType(type); 155 std::string technology = GetTechnologyForType(type);
156 network_event_log::AddEntry( 156 network_event_log::AddEntry(
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 } 612 }
613 if (type == kMatchTypeDefault || type == kMatchTypeNonVirtual || 613 if (type == kMatchTypeDefault || type == kMatchTypeNonVirtual ||
614 type == kMatchTypeWireless) { 614 type == kMatchTypeWireless) {
615 NOTREACHED(); 615 NOTREACHED();
616 return flimflam::kTypeWifi; 616 return flimflam::kTypeWifi;
617 } 617 }
618 return type; 618 return type;
619 } 619 }
620 620
621 } // namespace chromeos 621 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_manager_client_stub.cc ('k') | chromeos/network/network_state_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698