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

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

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/ssl/ssl_info.h ('k') | net/tools/dump_cache/simple_cache_dumper.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 (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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 HttpListenSocket::~HttpListenSocket() { 68 HttpListenSocket::~HttpListenSocket() {
69 DCHECK(thread_checker_.CalledOnValidThread()); 69 DCHECK(thread_checker_.CalledOnValidThread());
70 } 70 }
71 71
72 EmbeddedTestServer::EmbeddedTestServer( 72 EmbeddedTestServer::EmbeddedTestServer(
73 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread) 73 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread)
74 : io_thread_(io_thread), 74 : io_thread_(io_thread),
75 port_(-1), 75 port_(-1),
76 weak_factory_(this) { 76 weak_factory_(this) {
77 DCHECK(io_thread_); 77 DCHECK(io_thread_.get());
78 DCHECK(thread_checker_.CalledOnValidThread()); 78 DCHECK(thread_checker_.CalledOnValidThread());
79 } 79 }
80 80
81 EmbeddedTestServer::~EmbeddedTestServer() { 81 EmbeddedTestServer::~EmbeddedTestServer() {
82 DCHECK(thread_checker_.CalledOnValidThread()); 82 DCHECK(thread_checker_.CalledOnValidThread());
83 83
84 if (Started() && !ShutdownAndWaitUntilComplete()) { 84 if (Started() && !ShutdownAndWaitUntilComplete()) {
85 LOG(ERROR) << "EmbeddedTestServer failed to shut down."; 85 LOG(ERROR) << "EmbeddedTestServer failed to shut down.";
86 } 86 }
87 } 87 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 std::map<StreamListenSocket*, HttpConnection*>::iterator it = 238 std::map<StreamListenSocket*, HttpConnection*>::iterator it =
239 connections_.find(socket); 239 connections_.find(socket);
240 if (it == connections_.end()) { 240 if (it == connections_.end()) {
241 return NULL; 241 return NULL;
242 } 242 }
243 return it->second; 243 return it->second;
244 } 244 }
245 245
246 } // namespace test_server 246 } // namespace test_server
247 } // namespace net 247 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_info.h ('k') | net/tools/dump_cache/simple_cache_dumper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698