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

Unified Diff: content/browser/debugger/devtools_http_handler_impl.cc

Issue 10386048: Decouple DevTools from socket implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Created 8 years, 7 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/browser/debugger/devtools_http_handler_impl.cc
diff --git a/content/browser/debugger/devtools_http_handler_impl.cc b/content/browser/debugger/devtools_http_handler_impl.cc
index bbe45a42e5c72ba3720905dcb32dc557ab5bb761..5724a6fcd278d42b275b1c36c5fd6277ed22eca6 100644
--- a/content/browser/debugger/devtools_http_handler_impl.cc
+++ b/content/browser/debugger/devtools_http_handler_impl.cc
@@ -128,15 +128,13 @@ int DevToolsHttpHandler::GetFrontendResourceId(const std::string& name) {
// static
DevToolsHttpHandler* DevToolsHttpHandler::Start(
- const std::string& ip,
- int port,
const std::string& frontend_url,
+ net::StreamListenSocketFactory* socket_factory,
net::URLRequestContextGetter* request_context_getter,
DevToolsHttpHandlerDelegate* delegate) {
DevToolsHttpHandlerImpl* http_handler =
- new DevToolsHttpHandlerImpl(ip,
- port,
- frontend_url,
+ new DevToolsHttpHandlerImpl(frontend_url,
pfeldman 2012/05/14 11:12:00 socket_factory should probably go first (as it was
Philippe 2012/05/14 12:36:52 I made it second to keep the mutable state last. f
mmenke 2012/05/14 20:45:19 The factory doesn't look terribly mutable to me.
Philippe 2012/05/15 14:39:09 In practice (in TCPListenSocketFactory::CreateAndL
+ socket_factory,
request_context_getter,
delegate);
http_handler->Start();
@@ -528,14 +526,12 @@ void DevToolsHttpHandlerImpl::OnReadCompleted(net::URLRequest* request,
}
DevToolsHttpHandlerImpl::DevToolsHttpHandlerImpl(
- const std::string& ip,
- int port,
const std::string& frontend_url,
+ net::StreamListenSocketFactory* socket_factory,
net::URLRequestContextGetter* request_context_getter,
DevToolsHttpHandlerDelegate* delegate)
- : ip_(ip),
- port_(port),
- overridden_frontend_url_(frontend_url),
+ : overridden_frontend_url_(frontend_url),
+ socket_factory_(socket_factory),
request_context_getter_(request_context_getter),
delegate_(delegate) {
if (overridden_frontend_url_.empty())
@@ -548,7 +544,7 @@ DevToolsHttpHandlerImpl::DevToolsHttpHandlerImpl(
}
void DevToolsHttpHandlerImpl::Init() {
- server_ = new net::HttpServer(ip_, port_, this);
+ server_ = new net::HttpServer(this, socket_factory_.get());
}
// Run on I/O thread

Powered by Google App Engine
This is Rietveld 408576698