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

Side by Side Diff: services/http_server/http_server_impl.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.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 unified diff | Download patch
« no previous file with comments | « services/http_server/http_server_apptest.cc ('k') | services/java_handler/java_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "mojo/public/cpp/application/application_impl.h" 11 #include "mojo/public/cpp/application/application_impl.h"
12 #include "mojo/public/cpp/system/data_pipe.h" 12 #include "mojo/public/cpp/system/data_pipe.h"
13 #include "mojo/services/http_server/cpp/http_server_util.h" 13 #include "mojo/services/http_server/cpp/http_server_util.h"
14 #include "services/http_server/connection.h" 14 #include "services/http_server/connection.h"
15 #include "services/http_server/http_server_factory_impl.h" 15 #include "services/http_server/http_server_factory_impl.h"
16 16
17 namespace http_server { 17 namespace http_server {
18 18
19 HttpServerImpl::HttpServerImpl(mojo::ApplicationImpl* app, 19 HttpServerImpl::HttpServerImpl(mojo::ApplicationImpl* app,
20 HttpServerFactoryImpl* factory, 20 HttpServerFactoryImpl* factory,
21 mojo::NetAddressPtr requested_local_address) 21 mojo::NetAddressPtr requested_local_address)
22 : factory_(factory), 22 : factory_(factory),
23 requested_local_address_(requested_local_address.Pass()), 23 requested_local_address_(requested_local_address.Pass()),
24 assigned_port_(0), 24 assigned_port_(0),
25 weak_ptr_factory_(this) { 25 weak_ptr_factory_(this) {
26 app->ConnectToService("mojo:network_service", &network_service_); 26 app->ConnectToServiceDeprecated("mojo:network_service", &network_service_);
27 Start(); 27 Start();
28 } 28 }
29 29
30 HttpServerImpl::~HttpServerImpl() { 30 HttpServerImpl::~HttpServerImpl() {
31 } 31 }
32 32
33 void HttpServerImpl::AddBinding(mojo::InterfaceRequest<HttpServer> request) { 33 void HttpServerImpl::AddBinding(mojo::InterfaceRequest<HttpServer> request) {
34 bindings_.AddBinding(this, request.Pass()); 34 bindings_.AddBinding(this, request.Pass());
35 } 35 }
36 36
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 HttpServerImpl::Handler::Handler(const std::string& pattern, 164 HttpServerImpl::Handler::Handler(const std::string& pattern,
165 HttpHandlerPtr http_handler) 165 HttpHandlerPtr http_handler)
166 : pattern(new RE2(pattern.c_str())), http_handler(http_handler.Pass()) { 166 : pattern(new RE2(pattern.c_str())), http_handler(http_handler.Pass()) {
167 } 167 }
168 168
169 HttpServerImpl::Handler::~Handler() { 169 HttpServerImpl::Handler::~Handler() {
170 } 170 }
171 171
172 } // namespace http_server 172 } // namespace http_server
OLDNEW
« no previous file with comments | « services/http_server/http_server_apptest.cc ('k') | services/java_handler/java_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698