| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "extensions/browser/api/diagnostics/diagnostics_api.h" | 5 #include "extensions/browser/api/diagnostics/diagnostics_api.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void DiagnosticsSendPacketFunction::AsyncWorkStart() { | 68 void DiagnosticsSendPacketFunction::AsyncWorkStart() { |
| 69 std::map<std::string, std::string> config; | 69 std::map<std::string, std::string> config; |
| 70 config[kCount] = kDefaultCount; | 70 config[kCount] = kDefaultCount; |
| 71 if (parameters_->options.ttl) | 71 if (parameters_->options.ttl) |
| 72 config[kTTL] = base::IntToString(*parameters_->options.ttl); | 72 config[kTTL] = base::IntToString(*parameters_->options.ttl); |
| 73 if (parameters_->options.timeout) | 73 if (parameters_->options.timeout) |
| 74 config[kTimeout] = base::IntToString(*parameters_->options.timeout); | 74 config[kTimeout] = base::IntToString(*parameters_->options.timeout); |
| 75 if (parameters_->options.size) | 75 if (parameters_->options.size) |
| 76 config[kSize] = base::IntToString(*parameters_->options.size); | 76 config[kSize] = base::IntToString(*parameters_->options.size); |
| 77 | 77 |
| 78 //JAMES uh oh |
| 78 chromeos::DBusThreadManager::Get() | 79 chromeos::DBusThreadManager::Get() |
| 79 ->GetDebugDaemonClient() | 80 ->GetDebugDaemonClient() |
| 80 ->TestICMPWithOptions( | 81 ->TestICMPWithOptions( |
| 81 parameters_->options.ip, config, | 82 parameters_->options.ip, config, |
| 82 base::Bind( | 83 base::Bind( |
| 83 OnTestICMPCompleted, | 84 OnTestICMPCompleted, |
| 84 base::Bind(&DiagnosticsSendPacketFunction::OnCompleted, this))); | 85 base::Bind(&DiagnosticsSendPacketFunction::OnCompleted, this))); |
| 85 } | 86 } |
| 86 | 87 |
| 87 } // namespace extensions | 88 } // namespace extensions |
| OLD | NEW |