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

Side by Side Diff: net/url_request/url_request.cc

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: rebase on r476634 Created 3 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
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_context.h » ('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/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 void URLRequest::Delegate::OnResponseStarted(URLRequest* request) { 169 void URLRequest::Delegate::OnResponseStarted(URLRequest* request) {
170 NOTREACHED(); 170 NOTREACHED();
171 } 171 }
172 172
173 /////////////////////////////////////////////////////////////////////////////// 173 ///////////////////////////////////////////////////////////////////////////////
174 // URLRequest 174 // URLRequest
175 175
176 URLRequest::~URLRequest() { 176 URLRequest::~URLRequest() {
177 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
177 Cancel(); 178 Cancel();
178 179
179 if (network_delegate_) { 180 if (network_delegate_) {
180 network_delegate_->NotifyURLRequestDestroyed(this); 181 network_delegate_->NotifyURLRequestDestroyed(this);
181 if (job_.get()) 182 if (job_.get())
182 job_->NotifyURLRequestDestroyed(); 183 job_->NotifyURLRequestDestroyed();
183 } 184 }
184 185
185 // Delete job before |this|, since subclasses may do weird things, like depend 186 // Delete job before |this|, since subclasses may do weird things, like depend
186 // on UserData associated with |this| and poke at it during teardown. 187 // on UserData associated with |this| and poke at it during teardown.
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 out->clear(); 1216 out->clear();
1216 } 1217 }
1217 1218
1218 void URLRequest::set_status(URLRequestStatus status) { 1219 void URLRequest::set_status(URLRequestStatus status) {
1219 DCHECK(status_.is_io_pending() || status_.is_success() || 1220 DCHECK(status_.is_io_pending() || status_.is_success() ||
1220 (!status.is_success() && !status.is_io_pending())); 1221 (!status.is_success() && !status.is_io_pending()));
1221 status_ = status; 1222 status_ = status;
1222 } 1223 }
1223 1224
1224 } // namespace net 1225 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698