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

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

Issue 1250463002: Renames WeakBindingSet to BindingSet. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebasing Created 5 years, 5 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_factory_impl.h ('k') | services/icu_data/icu_data_impl.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/memory/scoped_vector.h" 6 #include "base/memory/scoped_vector.h"
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "mojo/common/weak_binding_set.h" 8 #include "mojo/common/binding_set.h"
9 #include "mojo/public/cpp/bindings/interface_request.h" 9 #include "mojo/public/cpp/bindings/interface_request.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h" 10 #include "mojo/public/cpp/bindings/strong_binding.h"
11 #include "mojo/services/http_server/public/interfaces/http_request.mojom.h" 11 #include "mojo/services/http_server/public/interfaces/http_request.mojom.h"
12 #include "mojo/services/http_server/public/interfaces/http_response.mojom.h" 12 #include "mojo/services/http_server/public/interfaces/http_response.mojom.h"
13 #include "mojo/services/http_server/public/interfaces/http_server.mojom.h" 13 #include "mojo/services/http_server/public/interfaces/http_server.mojom.h"
14 #include "mojo/services/network/public/interfaces/net_address.mojom.h" 14 #include "mojo/services/network/public/interfaces/net_address.mojom.h"
15 #include "mojo/services/network/public/interfaces/network_service.mojom.h" 15 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
16 #include "third_party/re2/re2/re2.h" 16 #include "third_party/re2/re2/re2.h"
17 17
18 namespace mojo { 18 namespace mojo {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void HandleRequest(Connection* connection, HttpRequestPtr request); 68 void HandleRequest(Connection* connection, HttpRequestPtr request);
69 69
70 void OnResponse(Connection* connection, HttpResponsePtr response); 70 void OnResponse(Connection* connection, HttpResponsePtr response);
71 71
72 HttpServerFactoryImpl* factory_; 72 HttpServerFactoryImpl* factory_;
73 73
74 mojo::NetAddressPtr requested_local_address_; 74 mojo::NetAddressPtr requested_local_address_;
75 uint16_t assigned_port_; 75 uint16_t assigned_port_;
76 std::vector<GetPortCallback> pending_get_port_callbacks_; 76 std::vector<GetPortCallback> pending_get_port_callbacks_;
77 77
78 mojo::WeakBindingSet<HttpServer> bindings_; 78 mojo::BindingSet<HttpServer> bindings_;
79 79
80 mojo::NetworkServicePtr network_service_; 80 mojo::NetworkServicePtr network_service_;
81 mojo::TCPBoundSocketPtr bound_socket_; 81 mojo::TCPBoundSocketPtr bound_socket_;
82 mojo::TCPServerSocketPtr server_socket_; 82 mojo::TCPServerSocketPtr server_socket_;
83 83
84 mojo::ScopedDataPipeProducerHandle pending_send_handle_; 84 mojo::ScopedDataPipeProducerHandle pending_send_handle_;
85 mojo::ScopedDataPipeConsumerHandle pending_receive_handle_; 85 mojo::ScopedDataPipeConsumerHandle pending_receive_handle_;
86 mojo::TCPConnectedSocketPtr pending_connected_socket_; 86 mojo::TCPConnectedSocketPtr pending_connected_socket_;
87 87
88 // TODO(vtl): Maybe this should be an std::set or unordered_set, which would 88 // TODO(vtl): Maybe this should be an std::set or unordered_set, which would
89 // simplify OnHandlerConnectionError(). 89 // simplify OnHandlerConnectionError().
90 ScopedVector<Handler> handlers_; 90 ScopedVector<Handler> handlers_;
91 91
92 base::WeakPtrFactory<HttpServerImpl> weak_ptr_factory_; 92 base::WeakPtrFactory<HttpServerImpl> weak_ptr_factory_;
93 DISALLOW_COPY_AND_ASSIGN(HttpServerImpl); 93 DISALLOW_COPY_AND_ASSIGN(HttpServerImpl);
94 }; 94 };
95 95
96 } // namespace http_server 96 } // namespace http_server
OLDNEW
« no previous file with comments | « services/http_server/http_server_factory_impl.h ('k') | services/icu_data/icu_data_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698