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

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

Issue 10702083: Add ContentViewDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: it builds (but other code in chrome/ doesn't...) Created 8 years, 5 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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // Sanity check out environment. 159 // Sanity check out environment.
160 DCHECK(MessageLoop::current()) << 160 DCHECK(MessageLoop::current()) <<
161 "The current MessageLoop must exist"; 161 "The current MessageLoop must exist";
162 DCHECK_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type()) << 162 DCHECK_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type()) <<
163 "The current MessageLoop must be TYPE_IO"; 163 "The current MessageLoop must be TYPE_IO";
164 164
165 CHECK(context); 165 CHECK(context);
166 context->url_requests()->insert(this); 166 context->url_requests()->insert(this);
167 167
168 LOG(WARNING) << "URLRequest(url=" << url.spec() << ");";
169
168 net_log_.BeginEvent(NetLog::TYPE_REQUEST_ALIVE); 170 net_log_.BeginEvent(NetLog::TYPE_REQUEST_ALIVE);
169 } 171 }
170 172
171 URLRequest::~URLRequest() { 173 URLRequest::~URLRequest() {
172 Cancel(); 174 Cancel();
173 175
174 if (context_->network_delegate()) { 176 if (context_->network_delegate()) {
175 context_->network_delegate()->NotifyURLRequestDestroyed(this); 177 context_->network_delegate()->NotifyURLRequestDestroyed(this);
176 if (job_) 178 if (job_)
177 job_->NotifyURLRequestDestroyed(); 179 job_->NotifyURLRequestDestroyed();
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 new base::debug::StackTrace(NULL, 0); 906 new base::debug::StackTrace(NULL, 0);
905 *stack_trace_copy = stack_trace; 907 *stack_trace_copy = stack_trace;
906 stack_trace_.reset(stack_trace_copy); 908 stack_trace_.reset(stack_trace_copy);
907 } 909 }
908 910
909 const base::debug::StackTrace* URLRequest::stack_trace() const { 911 const base::debug::StackTrace* URLRequest::stack_trace() const {
910 return stack_trace_.get(); 912 return stack_trace_.get();
911 } 913 }
912 914
913 } // namespace net 915 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698