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

Side by Side Diff: chromeos/dbus/shill_manager_client_stub.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
« no previous file with comments | « chromeos/dbus/shill_manager_client_stub.h ('k') | chromeos/network/network_state_handler.cc » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/dbus/shill_manager_client_stub.h" 5 #include "chromeos/dbus/shill_manager_client_stub.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/chromeos/chromeos_version.h" 8 #include "base/chromeos/chromeos_version.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 CallNotifyObserversPropertyChanged( 378 CallNotifyObserversPropertyChanged(
379 flimflam::kAvailableTechnologiesProperty, 0); 379 flimflam::kAvailableTechnologiesProperty, 0);
380 } 380 }
381 if (GetListProperty(flimflam::kEnabledTechnologiesProperty)->Remove( 381 if (GetListProperty(flimflam::kEnabledTechnologiesProperty)->Remove(
382 type_value, NULL)) { 382 type_value, NULL)) {
383 CallNotifyObserversPropertyChanged( 383 CallNotifyObserversPropertyChanged(
384 flimflam::kEnabledTechnologiesProperty, 0); 384 flimflam::kEnabledTechnologiesProperty, 0);
385 } 385 }
386 } 386 }
387 387
388 void ShillManagerClientStub::SetTechnologyInitializing(const std::string& type,
389 bool initializing) {
390 if (initializing) {
391 if (GetListProperty(shill::kUninitializedTechnologiesProperty)->
392 AppendIfNotPresent(base::Value::CreateStringValue(type))) {
393 CallNotifyObserversPropertyChanged(
394 shill::kUninitializedTechnologiesProperty, 0);
395 }
396 } else {
397 if (GetListProperty(shill::kUninitializedTechnologiesProperty)->Remove(
398 base::StringValue(type), NULL)) {
399 CallNotifyObserversPropertyChanged(
400 shill::kUninitializedTechnologiesProperty, 0);
401 }
402 }
403 }
404
388 void ShillManagerClientStub::ClearProperties() { 405 void ShillManagerClientStub::ClearProperties() {
389 stub_properties_.Clear(); 406 stub_properties_.Clear();
390 } 407 }
391 408
392 void ShillManagerClientStub::AddGeoNetwork( 409 void ShillManagerClientStub::AddGeoNetwork(
393 const std::string& technology, 410 const std::string& technology,
394 const base::DictionaryValue& network) { 411 const base::DictionaryValue& network) {
395 base::ListValue* list_value = NULL; 412 base::ListValue* list_value = NULL;
396 if (!stub_geo_networks_.GetListWithoutPathExpansion( 413 if (!stub_geo_networks_.GetListWithoutPathExpansion(
397 technology, &list_value)) { 414 technology, &list_value)) {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 base::FundamentalValue(false)); 586 base::FundamentalValue(false));
570 } 587 }
571 CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0); 588 CallNotifyObserversPropertyChanged(flimflam::kServicesProperty, 0);
572 CallNotifyObserversPropertyChanged(flimflam::kServiceWatchListProperty, 589 CallNotifyObserversPropertyChanged(flimflam::kServiceWatchListProperty,
573 0); 590 0);
574 if (!callback.is_null()) 591 if (!callback.is_null())
575 MessageLoop::current()->PostTask(FROM_HERE, callback); 592 MessageLoop::current()->PostTask(FROM_HERE, callback);
576 } 593 }
577 594
578 } // namespace chromeos 595 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_manager_client_stub.h ('k') | chromeos/network/network_state_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698