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

Side by Side Diff: content/browser/loader/throttling_resource_handler.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
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/loader/throttling_resource_handler.h" 5 #include "content/browser/loader/throttling_resource_handler.h"
6 6
7 #include "content/public/browser/resource_throttle.h" 7 #include "content/public/browser/resource_throttle.h"
8 #include "content/public/common/resource_response.h" 8 #include "content/public/common/resource_response.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 void ThrottlingResourceHandler::ResumeRedirect() { 154 void ThrottlingResourceHandler::ResumeRedirect() {
155 DCHECK(!cancelled_by_resource_throttle_); 155 DCHECK(!cancelled_by_resource_throttle_);
156 156
157 GURL new_url = deferred_url_; 157 GURL new_url = deferred_url_;
158 deferred_url_ = GURL(); 158 deferred_url_ = GURL();
159 scoped_refptr<ResourceResponse> response; 159 scoped_refptr<ResourceResponse> response;
160 deferred_response_.swap(response); 160 deferred_response_.swap(response);
161 161
162 bool defer = false; 162 bool defer = false;
163 if (!OnRequestRedirected(request_id_, new_url, response, &defer)) { 163 if (!OnRequestRedirected(request_id_, new_url, response.get(), &defer)) {
164 controller()->Cancel(); 164 controller()->Cancel();
165 } else if (!defer) { 165 } else if (!defer) {
166 controller()->Resume(); 166 controller()->Resume();
167 } 167 }
168 } 168 }
169 169
170 void ThrottlingResourceHandler::ResumeResponse() { 170 void ThrottlingResourceHandler::ResumeResponse() {
171 DCHECK(!cancelled_by_resource_throttle_); 171 DCHECK(!cancelled_by_resource_throttle_);
172 172
173 scoped_refptr<ResourceResponse> response; 173 scoped_refptr<ResourceResponse> response;
174 deferred_response_.swap(response); 174 deferred_response_.swap(response);
175 175
176 bool defer = false; 176 bool defer = false;
177 if (!OnResponseStarted(request_id_, response, &defer)) { 177 if (!OnResponseStarted(request_id_, response.get(), &defer)) {
178 controller()->Cancel(); 178 controller()->Cancel();
179 } else if (!defer) { 179 } else if (!defer) {
180 controller()->Resume(); 180 controller()->Resume();
181 } 181 }
182 } 182 }
183 183
184 } // namespace content 184 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/sync_resource_handler.cc ('k') | content/browser/net/sqlite_persistent_cookie_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698