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

Unified Diff: chrome/browser/extensions/api/diagnostics/diagnostics_api.h

Issue 883703004: Move chrome.diagnostics API to extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/diagnostics/diagnostics_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/diagnostics/diagnostics_api.h
diff --git a/chrome/browser/extensions/api/diagnostics/diagnostics_api.h b/chrome/browser/extensions/api/diagnostics/diagnostics_api.h
deleted file mode 100644
index ac0da63518247d8e3684a5ffbafe7dc913e9f50e..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/diagnostics/diagnostics_api.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_
-#define CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_
-
-#include <string>
-
-#include "base/memory/scoped_ptr.h"
-#include "chrome/common/extensions/api/diagnostics.h"
-#include "extensions/browser/api/async_api_function.h"
-
-namespace extensions {
-
-class DiagnosticsSendPacketFunction : public AsyncApiFunction {
- public:
- // Result code for sending packet. Platform specific AsyncWorkStart() will
- // finish with this ResultCode so we can maximize shared code.
- enum SendPacketResultCode {
- // Ping packed is sent and ICMP reply is received before time out.
- SEND_PACKET_OK,
-
- // Not implemented on the platform.
- SEND_PACKET_NOT_IMPLEMENTED,
-
- // The ping operation failed because of timeout or network unreachable.
- SEND_PACKET_FAILED,
- };
-
- DECLARE_EXTENSION_FUNCTION("diagnostics.sendPacket",
- DIAGNOSTICS_SENDPACKET);
-
- DiagnosticsSendPacketFunction();
-
- protected:
- ~DiagnosticsSendPacketFunction() override;
-
- // AsyncApiFunction:
- bool Prepare() override;
- // This methods will be implemented differently on different platforms.
- void AsyncWorkStart() override;
- bool Respond() override;
-
- private:
- void SendPingPacket();
- void OnCompleted(SendPacketResultCode result_code,
- const std::string& ip,
- double latency);
-
- scoped_ptr<extensions::api::diagnostics::SendPacket::Params>
- parameters_;
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_DIAGNOSTICS_API_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/diagnostics/diagnostics_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698