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

Unified Diff: mojo/services/network/http_server_impl.h

Issue 1873463003: Remove mojo network service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « mojo/services/network/http_connection_impl.cc ('k') | mojo/services/network/http_server_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/http_server_impl.h
diff --git a/mojo/services/network/http_server_impl.h b/mojo/services/network/http_server_impl.h
deleted file mode 100644
index f79b7a8889499d27d242d28caa4dfb15a77c8bf2..0000000000000000000000000000000000000000
--- a/mojo/services/network/http_server_impl.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2015 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 MOJO_SERVICES_NETWORK_HTTP_SERVER_IMPL_H_
-#define MOJO_SERVICES_NETWORK_HTTP_SERVER_IMPL_H_
-
-#include <map>
-
-#include "base/macros.h"
-#include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
-#include "mojo/services/network/public/interfaces/http_server.mojom.h"
-#include "mojo/services/network/public/interfaces/net_address.mojom.h"
-#include "mojo/shell/public/cpp/message_loop_ref.h"
-#include "net/server/http_server.h"
-
-namespace net {
-class HttpServer;
-}
-
-namespace mojo {
-
-class HttpConnectionImpl;
-
-class HttpServerImpl : public net::HttpServer::Delegate {
- public:
- static void Create(
- NetAddressPtr local_address,
- HttpServerDelegatePtr delegate,
- scoped_ptr<mojo::MessageLoopRef> app_refcount,
- const Callback<void(NetworkErrorPtr, NetAddressPtr)>& callback);
-
- net::HttpServer* server() { return server_.get(); }
-
- private:
- // The lifetime of the returned HttpServerImpl object is bound to that of
- // |delegate|'s underlying pipe. The object will self-destruct when it is
- // notified that |delegate|'s pipe is closed. Deleting the object directly
- // before that is okay, too.
- HttpServerImpl(HttpServerDelegatePtr delegate,
- scoped_ptr<mojo::MessageLoopRef> app_refcount);
- ~HttpServerImpl() override;
-
- int Start(NetAddressPtr local_address);
- NetAddressPtr GetLocalAddress() const;
-
- // net::HttpServer::Delegate implementation.
- void OnConnect(int connection_id) override;
- void OnHttpRequest(int connection_id,
- const net::HttpServerRequestInfo& info) override;
- void OnWebSocketRequest(int connection_id,
- const net::HttpServerRequestInfo& info) override;
- void OnWebSocketMessage(int connection_id, const std::string& data) override;
- void OnClose(int connection_id) override;
-
- HttpServerDelegatePtr delegate_;
- scoped_ptr<mojo::MessageLoopRef> app_refcount_;
- scoped_ptr<net::HttpServer> server_;
-
- std::map<int, linked_ptr<HttpConnectionImpl>> connections_;
-
- DISALLOW_COPY_AND_ASSIGN(HttpServerImpl);
-};
-
-} // namespace mojo
-
-#endif // MOJO_SERVICES_NETWORK_HTTP_SERVER_IMPL_H_
« no previous file with comments | « mojo/services/network/http_connection_impl.cc ('k') | mojo/services/network/http_server_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698