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

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

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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/buffered_resource_handler.h" 5 #include "content/browser/loader/buffered_resource_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return next_handler_->OnResponseCompleted(request_id, status, security_info); 194 return next_handler_->OnResponseCompleted(request_id, status, security_info);
195 } 195 }
196 196
197 void BufferedResourceHandler::Resume() { 197 void BufferedResourceHandler::Resume() {
198 switch (state_) { 198 switch (state_) {
199 case STATE_BUFFERING: 199 case STATE_BUFFERING:
200 case STATE_PROCESSING: 200 case STATE_PROCESSING:
201 NOTREACHED(); 201 NOTREACHED();
202 break; 202 break;
203 case STATE_REPLAYING: 203 case STATE_REPLAYING:
204 MessageLoop::current()->PostTask( 204 base::MessageLoop::current()->PostTask(
205 FROM_HERE, 205 FROM_HERE,
206 base::Bind(&BufferedResourceHandler::CallReplayReadCompleted, 206 base::Bind(&BufferedResourceHandler::CallReplayReadCompleted,
207 weak_ptr_factory_.GetWeakPtr())); 207 weak_ptr_factory_.GetWeakPtr()));
208 break; 208 break;
209 case STATE_STARTING: 209 case STATE_STARTING:
210 case STATE_STREAMING: 210 case STATE_STREAMING:
211 controller()->Resume(); 211 controller()->Resume();
212 break; 212 break;
213 } 213 }
214 } 214 }
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 const std::vector<webkit::WebPluginInfo>& plugins) { 463 const std::vector<webkit::WebPluginInfo>& plugins) {
464 bool defer = false; 464 bool defer = false;
465 if (!ProcessResponse(&defer)) { 465 if (!ProcessResponse(&defer)) {
466 controller()->Cancel(); 466 controller()->Cancel();
467 } else if (!defer) { 467 } else if (!defer) {
468 controller()->Resume(); 468 controller()->Resume();
469 } 469 }
470 } 470 }
471 471
472 } // namespace content 472 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698