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

Unified Diff: content/public/browser/devtools_http_handler.h

Issue 497223003: Revert of Replace StreamListenSocket with StreamSocket in HttpServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: content/public/browser/devtools_http_handler.h
diff --git a/content/public/browser/devtools_http_handler.h b/content/public/browser/devtools_http_handler.h
index 2b656b649580c0839eed53504954e51460f67ac4..cdceff8dfd4d8f531a5cb0db0cbc3479810aa817 100644
--- a/content/public/browser/devtools_http_handler.h
+++ b/content/public/browser/devtools_http_handler.h
@@ -8,13 +8,12 @@
#include <string>
#include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
class GURL;
namespace net {
-class ServerSocket;
+class StreamListenSocketFactory;
class URLRequestContextGetter;
}
@@ -27,32 +26,6 @@
// this browser.
class DevToolsHttpHandler {
public:
-
- // Factory of net::ServerSocket. This is to separate instantiating dev tools
- // and instantiating server socket.
- class CONTENT_EXPORT ServerSocketFactory {
- public:
- ServerSocketFactory(const std::string& address, int port, int backlog);
- virtual ~ServerSocketFactory();
-
- // Returns a new instance of ServerSocket or NULL if an error occurred.
- // It calls ServerSocket::ListenWithAddressAndPort() with address, port and
- // backlog passed to constructor.
- virtual scoped_ptr<net::ServerSocket> CreateAndListen() const;
-
- protected:
- // Creates a server socket. ServerSocket::Listen() will be called soon
- // unless it returns NULL.
- virtual scoped_ptr<net::ServerSocket> Create() const = 0;
-
- const std::string address_;
- const int port_;
- const int backlog_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ServerSocketFactory);
- };
-
// Returns true if the given protocol version is supported.
CONTENT_EXPORT static bool IsSupportedProtocolVersion(
const std::string& version);
@@ -67,7 +40,7 @@
// port selected by the OS will be written to a well-known file in
// the output directory.
CONTENT_EXPORT static DevToolsHttpHandler* Start(
- scoped_ptr<ServerSocketFactory> server_socket_factory,
+ const net::StreamListenSocketFactory* socket_factory,
const std::string& frontend_url,
DevToolsHttpHandlerDelegate* delegate,
const base::FilePath& active_port_output_directory);
« no previous file with comments | « content/browser/devtools/devtools_http_handler_unittest.cc ('k') | content/shell/browser/shell_devtools_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698