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

Side by Side Diff: webkit/tools/test_shell/simple_resource_loader_bridge.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file contains an implementation of the ResourceLoaderBridge class. 5 // This file contains an implementation of the ResourceLoaderBridge class.
6 // The class is implemented using net::URLRequest, meaning it is a "simple" 6 // The class is implemented using net::URLRequest, meaning it is a "simple"
7 // version that directly issues requests. The more complicated one used in the 7 // version that directly issues requests. The more complicated one used in the
8 // browser uses IPC. 8 // browser uses IPC.
9 // 9 //
10 // Because net::URLRequest only provides an asynchronous resource loading API, 10 // Because net::URLRequest only provides an asynchronous resource loading API,
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 path, base::MessageLoopProxy::current()); 314 path, base::MessageLoopProxy::current());
315 file_stream_.Open( 315 file_stream_.Open(
316 path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_WRITE); 316 path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_WRITE);
317 } 317 }
318 } 318 }
319 319
320 request_->Start(); 320 request_->Start();
321 321
322 if (request_->has_upload() && 322 if (request_->has_upload() &&
323 params->load_flags & net::LOAD_ENABLE_UPLOAD_PROGRESS) { 323 params->load_flags & net::LOAD_ENABLE_UPLOAD_PROGRESS) {
324 upload_progress_timer_.Start(FROM_HERE, 324 upload_progress_timer_.Start(
325 base::TimeDelta::FromMilliseconds(kUpdateUploadProgressIntervalMsec), 325 base::TimeDelta::FromMilliseconds(kUpdateUploadProgressIntervalMsec),
326 this, &RequestProxy::MaybeUpdateUploadProgress); 326 this, &RequestProxy::MaybeUpdateUploadProgress);
327 } 327 }
328 328
329 delete params; 329 delete params;
330 } 330 }
331 331
332 void AsyncCancel() { 332 void AsyncCancel() {
333 // This can be null in cases where the request is already done. 333 // This can be null in cases where the request is already done.
334 if (!request_.get()) 334 if (!request_.get())
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 899
900 // static 900 // static
901 scoped_refptr<base::MessageLoopProxy> 901 scoped_refptr<base::MessageLoopProxy>
902 SimpleResourceLoaderBridge::GetIoThread() { 902 SimpleResourceLoaderBridge::GetIoThread() {
903 if (!EnsureIOThread()) { 903 if (!EnsureIOThread()) {
904 LOG(DFATAL) << "Failed to create IO thread."; 904 LOG(DFATAL) << "Failed to create IO thread.";
905 return NULL; 905 return NULL;
906 } 906 }
907 return g_io_thread->message_loop_proxy(); 907 return g_io_thread->message_loop_proxy();
908 } 908 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698