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

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

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 #include "net/test/embedded_test_server/embedded_test_server.h" 5 #include "net/test/embedded_test_server/embedded_test_server.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 14 matching lines...) Expand all
25 namespace test_server { 25 namespace test_server {
26 26
27 namespace { 27 namespace {
28 28
29 class CustomHttpResponse : public HttpResponse { 29 class CustomHttpResponse : public HttpResponse {
30 public: 30 public:
31 CustomHttpResponse(const std::string& headers, const std::string& contents) 31 CustomHttpResponse(const std::string& headers, const std::string& contents)
32 : headers_(headers), contents_(contents) { 32 : headers_(headers), contents_(contents) {
33 } 33 }
34 34
35 virtual std::string ToResponseString() const override { 35 std::string ToResponseString() const override {
36 return headers_ + "\r\n" + contents_; 36 return headers_ + "\r\n" + contents_;
37 } 37 }
38 38
39 private: 39 private:
40 std::string headers_; 40 std::string headers_;
41 std::string contents_; 41 std::string contents_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(CustomHttpResponse); 43 DISALLOW_COPY_AND_ASSIGN(CustomHttpResponse);
44 }; 44 };
45 45
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 FROM_HERE, closure, run_loop.QuitClosure())) { 338 FROM_HERE, closure, run_loop.QuitClosure())) {
339 return false; 339 return false;
340 } 340 }
341 run_loop.Run(); 341 run_loop.Run();
342 342
343 return true; 343 return true;
344 } 344 }
345 345
346 } // namespace test_server 346 } // namespace test_server
347 } // namespace net 347 } // namespace net
OLDNEW
« no previous file with comments | « net/test/embedded_test_server/embedded_test_server.h ('k') | net/test/embedded_test_server/embedded_test_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698