| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/extensions/api/api_function.h" | |
| 12 #include "chrome/common/extensions/api/diagnostics.h" | 11 #include "chrome/common/extensions/api/diagnostics.h" |
| 12 #include "extensions/browser/api/async_api_function.h" |
| 13 | 13 |
| 14 namespace extensions { | 14 namespace extensions { |
| 15 | 15 |
| 16 class DiagnosticsSendPacketFunction : public AsyncApiFunction { | 16 class DiagnosticsSendPacketFunction : public AsyncApiFunction { |
| 17 public: | 17 public: |
| 18 // Result code for sending packet. Platform specific AsyncWorkStart() will | 18 // Result code for sending packet. Platform specific AsyncWorkStart() will |
| 19 // finish with this ResultCode so we can maximize shared code. | 19 // finish with this ResultCode so we can maximize shared code. |
| 20 enum SendPacketResultCode { | 20 enum SendPacketResultCode { |
| 21 // Ping packed is sent and ICMP reply is received before time out. | 21 // Ping packed is sent and ICMP reply is received before time out. |
| 22 SEND_PACKET_OK, | 22 SEND_PACKET_OK, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 48 const std::string& ip, | 48 const std::string& ip, |
| 49 double latency); | 49 double latency); |
| 50 | 50 |
| 51 scoped_ptr<extensions::api::diagnostics::SendPacket::Params> | 51 scoped_ptr<extensions::api::diagnostics::SendPacket::Params> |
| 52 parameters_; | 52 parameters_; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace extensions | 55 } // namespace extensions |
| 56 | 56 |
| 57 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_ | 57 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_ |
| OLD | NEW |