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

Side by Side Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 23441025: Clean up NetworkState members (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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 "chrome/browser/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 return_value->SetBoolean("cellular_enabled", cellular_enabled); 557 return_value->SetBoolean("cellular_enabled", cellular_enabled);
558 if (cellular_available && cellular_enabled) { 558 if (cellular_available && cellular_enabled) {
559 const chromeos::CellularNetworkVector& cellular_networks = 559 const chromeos::CellularNetworkVector& cellular_networks =
560 network_library->cellular_networks(); 560 network_library->cellular_networks();
561 DictionaryValue* items = new DictionaryValue; 561 DictionaryValue* items = new DictionaryValue;
562 for (size_t i = 0; i < cellular_networks.size(); ++i) { 562 for (size_t i = 0; i < cellular_networks.size(); ++i) {
563 DictionaryValue* item = GetNetworkInfoDict(cellular_networks[i]); 563 DictionaryValue* item = GetNetworkInfoDict(cellular_networks[i]);
564 item->SetInteger("strength", cellular_networks[i]->strength()); 564 item->SetInteger("strength", cellular_networks[i]->strength());
565 item->SetString("operator_name", cellular_networks[i]->operator_name()); 565 item->SetString("operator_name", cellular_networks[i]->operator_name());
566 item->SetString("operator_code", cellular_networks[i]->operator_code()); 566 item->SetString("operator_code", cellular_networks[i]->operator_code());
567 item->SetString("payment_url", cellular_networks[i]->payment_url());
568 item->SetString("usage_url", cellular_networks[i]->usage_url());
569 item->SetString("network_technology", 567 item->SetString("network_technology",
570 cellular_networks[i]->GetNetworkTechnologyString()); 568 cellular_networks[i]->GetNetworkTechnologyString());
571 item->SetString("activation_state", 569 item->SetString("activation_state",
572 cellular_networks[i]->GetActivationStateString()); 570 cellular_networks[i]->GetActivationStateString());
573 item->SetString("roaming_state", 571 item->SetString("roaming_state",
574 cellular_networks[i]->GetRoamingStateString()); 572 cellular_networks[i]->GetRoamingStateString());
575 items->Set(cellular_networks[i]->service_path(), item); 573 items->Set(cellular_networks[i]->service_path(), item);
576 } 574 }
577 items->SetInteger("network_type", chromeos::TYPE_CELLULAR); 575 items->SetInteger("network_type", chromeos::TYPE_CELLULAR);
578 return_value->Set("cellular_networks", items); 576 return_value->Set("cellular_networks", items);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 906
909 void TestingAutomationProvider::AddChromeosObservers() { 907 void TestingAutomationProvider::AddChromeosObservers() {
910 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 908 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
911 AddObserver(this); 909 AddObserver(this);
912 } 910 }
913 911
914 void TestingAutomationProvider::RemoveChromeosObservers() { 912 void TestingAutomationProvider::RemoveChromeosObservers() {
915 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 913 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
916 RemoveObserver(this); 914 RemoveObserver(this);
917 } 915 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698