| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/automation/automation_provider_json.h" | 9 #include "chrome/browser/automation/automation_provider_json.h" |
| 10 #include "chrome/browser/automation/automation_provider_observers.h" | 10 #include "chrome/browser/automation/automation_provider_observers.h" |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 DictionaryValue* args, IPC::Message* reply_message) { | 471 DictionaryValue* args, IPC::Message* reply_message) { |
| 472 if (!EnsureCrosLibraryLoaded(this, reply_message)) | 472 if (!EnsureCrosLibraryLoaded(this, reply_message)) |
| 473 return; | 473 return; |
| 474 std::string service_path; | 474 std::string service_path; |
| 475 if (!args->GetString("service_path", &service_path)) { | 475 if (!args->GetString("service_path", &service_path)) { |
| 476 AutomationJSONReply(this, reply_message).SendError( | 476 AutomationJSONReply(this, reply_message).SendError( |
| 477 "Invalid or missing args."); | 477 "Invalid or missing args."); |
| 478 return; | 478 return; |
| 479 } | 479 } |
| 480 | 480 |
| 481 CrosLibrary::Get()->GetNetworkLibrary()->ForgetWifiNetwork(service_path); | 481 CrosLibrary::Get()->GetNetworkLibrary()->ForgetNetwork(service_path); |
| 482 AutomationJSONReply(this, reply_message).SendSuccess(NULL); | 482 AutomationJSONReply(this, reply_message).SendSuccess(NULL); |
| 483 } | 483 } |
| 484 | 484 |
| 485 void TestingAutomationProvider::ConnectToHiddenWifiNetwork( | 485 void TestingAutomationProvider::ConnectToHiddenWifiNetwork( |
| 486 DictionaryValue* args, IPC::Message* reply_message) { | 486 DictionaryValue* args, IPC::Message* reply_message) { |
| 487 if (!EnsureCrosLibraryLoaded(this, reply_message)) | 487 if (!EnsureCrosLibraryLoaded(this, reply_message)) |
| 488 return; | 488 return; |
| 489 | 489 |
| 490 std::string ssid, security, password; | 490 std::string ssid, security, password; |
| 491 if (!args->GetString("ssid", &ssid) || | 491 if (!args->GetString("ssid", &ssid) || |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 bool mute; | 748 bool mute; |
| 749 if (!args->GetBoolean("mute", &mute)) { | 749 if (!args->GetBoolean("mute", &mute)) { |
| 750 reply.SendError("Invalid or missing args."); | 750 reply.SendError("Invalid or missing args."); |
| 751 return; | 751 return; |
| 752 } | 752 } |
| 753 | 753 |
| 754 chromeos::AudioHandler* audio_handler = chromeos::AudioHandler::GetInstance(); | 754 chromeos::AudioHandler* audio_handler = chromeos::AudioHandler::GetInstance(); |
| 755 audio_handler->SetMute(mute); | 755 audio_handler->SetMute(mute); |
| 756 reply.SendSuccess(NULL); | 756 reply.SendSuccess(NULL); |
| 757 } | 757 } |
| OLD | NEW |