| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "services/http_server/http_server_impl.h" | 5 #include "services/http_server/http_server_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "mojo/public/cpp/application/application_impl.h" | 9 #include "mojo/public/cpp/application/application_impl.h" |
| 10 #include "mojo/public/cpp/bindings/error_handler.h" | 10 #include "mojo/public/cpp/bindings/error_handler.h" |
| 11 #include "mojo/public/cpp/system/data_pipe.h" | 11 #include "mojo/public/cpp/system/data_pipe.h" |
| 12 #include "mojo/services/http_server/public/cpp/http_server_util.h" |
| 12 #include "services/http_server/connection.h" | 13 #include "services/http_server/connection.h" |
| 13 #include "services/http_server/http_server_factory_impl.h" | 14 #include "services/http_server/http_server_factory_impl.h" |
| 14 #include "services/http_server/public/http_server_util.h" | |
| 15 | 15 |
| 16 namespace http_server { | 16 namespace http_server { |
| 17 | 17 |
| 18 HttpServerImpl::HttpServerImpl(mojo::ApplicationImpl* app, | 18 HttpServerImpl::HttpServerImpl(mojo::ApplicationImpl* app, |
| 19 HttpServerFactoryImpl* factory, | 19 HttpServerFactoryImpl* factory, |
| 20 mojo::NetAddressPtr requested_local_address) | 20 mojo::NetAddressPtr requested_local_address) |
| 21 : factory_(factory), | 21 : factory_(factory), |
| 22 requested_local_address_(requested_local_address.Pass()), | 22 requested_local_address_(requested_local_address.Pass()), |
| 23 assigned_port_(0), | 23 assigned_port_(0), |
| 24 weak_ptr_factory_(this) { | 24 weak_ptr_factory_(this) { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 HttpServerImpl::Handler::Handler(const std::string& pattern, | 162 HttpServerImpl::Handler::Handler(const std::string& pattern, |
| 163 HttpHandlerPtr http_handler) | 163 HttpHandlerPtr http_handler) |
| 164 : pattern(new RE2(pattern.c_str())), http_handler(http_handler.Pass()) { | 164 : pattern(new RE2(pattern.c_str())), http_handler(http_handler.Pass()) { |
| 165 } | 165 } |
| 166 | 166 |
| 167 HttpServerImpl::Handler::~Handler() { | 167 HttpServerImpl::Handler::~Handler() { |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace http_server | 170 } // namespace http_server |
| OLD | NEW |