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

Side by Side Diff: net/test/embedded_test_server/embedded_test_server.h

Issue 1979173002: Add WARN_UNUSED_RESULT to bool EmbeddedTestServer::Start() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « content/browser/service_worker/service_worker_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ 5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_
6 #define NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ 6 #define NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 // Sets a connection listener, that would be notified when various connection 127 // Sets a connection listener, that would be notified when various connection
128 // events happen. May only be called before the server is started. Caller 128 // events happen. May only be called before the server is started. Caller
129 // maintains ownership of the listener. 129 // maintains ownership of the listener.
130 void SetConnectionListener(EmbeddedTestServerConnectionListener* listener); 130 void SetConnectionListener(EmbeddedTestServerConnectionListener* listener);
131 131
132 // Initializes and waits until the server is ready to accept requests. 132 // Initializes and waits until the server is ready to accept requests.
133 // This is the equivalent of calling InitializeAndListen() followed by 133 // This is the equivalent of calling InitializeAndListen() followed by
134 // StartAcceptingConnections(). 134 // StartAcceptingConnections().
135 // Returns whether a listening socket has been successfully created. 135 // Returns whether a listening socket has been successfully created.
136 bool Start(); 136 bool Start() WARN_UNUSED_RESULT;
137 137
138 // Starts listening for incoming connections but will not yet accept them. 138 // Starts listening for incoming connections but will not yet accept them.
139 // Returns whether a listening socket has been succesfully created. 139 // Returns whether a listening socket has been succesfully created.
140 bool InitializeAndListen() WARN_UNUSED_RESULT; 140 bool InitializeAndListen() WARN_UNUSED_RESULT;
141 141
142 // Starts the Accept IO Thread and begins accepting connections. 142 // Starts the Accept IO Thread and begins accepting connections.
143 void StartAcceptingConnections(); 143 void StartAcceptingConnections();
144 144
145 // Shuts down the http server and waits until the shutdown is complete. 145 // Shuts down the http server and waits until the shutdown is complete.
146 bool ShutdownAndWaitUntilComplete() WARN_UNUSED_RESULT; 146 bool ShutdownAndWaitUntilComplete() WARN_UNUSED_RESULT;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 }; 290 };
291 291
292 } // namespace test_server 292 } // namespace test_server
293 293
294 // TODO(svaldez): Refactor EmbeddedTestServer to be in the net namespace. 294 // TODO(svaldez): Refactor EmbeddedTestServer to be in the net namespace.
295 using test_server::EmbeddedTestServer; 295 using test_server::EmbeddedTestServer;
296 296
297 } // namespace net 297 } // namespace net
298 298
299 #endif // NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ 299 #endif // NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698