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

Side by Side Diff: content/browser/devtools/tethering_handler.cc

Issue 502203002: Remove implicit conversions from scoped_refptr to T* in content/browser/devtools/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/devtools/renderer_overrides_handler.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 #include "content/browser/devtools/tethering_handler.h" 5 #include "content/browser/devtools/tethering_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 wire_buffer_size_ -= offset; 143 wire_buffer_size_ -= offset;
144 wire_buffer_->set_offset(0); 144 wire_buffer_->set_offset(0);
145 } 145 }
146 146
147 if (result != net::ERR_IO_PENDING) 147 if (result != net::ERR_IO_PENDING)
148 OnClientWrite(result); 148 OnClientWrite(result);
149 return; 149 return;
150 } 150 }
151 151
152 void SelfDestruct() { 152 void SelfDestruct() {
153 if (wire_buffer_ && wire_buffer_->offset() != wire_buffer_size_) { 153 if (wire_buffer_.get() && wire_buffer_->offset() != wire_buffer_size_) {
154 pending_destruction_ = true; 154 pending_destruction_ = true;
155 return; 155 return;
156 } 156 }
157 delete this; 157 delete this;
158 } 158 }
159 159
160 private: 160 private:
161 scoped_ptr<net::StreamSocket> client_socket_; 161 scoped_ptr<net::StreamSocket> client_socket_;
162 scoped_ptr<net::StreamListenSocket> server_socket_; 162 scoped_ptr<net::StreamListenSocket> server_socket_;
163 scoped_ptr<net::StreamListenSocket> accepted_socket_; 163 scoped_ptr<net::StreamListenSocket> accepted_socket_;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 BoundSockets::iterator it = bound_sockets_.find(port); 300 BoundSockets::iterator it = bound_sockets_.find(port);
301 if (it == bound_sockets_.end()) 301 if (it == bound_sockets_.end())
302 return command->InternalErrorResponse("Port is not bound"); 302 return command->InternalErrorResponse("Port is not bound");
303 303
304 delete it->second; 304 delete it->second;
305 bound_sockets_.erase(it); 305 bound_sockets_.erase(it);
306 return command->SuccessResponse(NULL); 306 return command->SuccessResponse(NULL);
307 } 307 }
308 308
309 } // namespace content 309 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/renderer_overrides_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698