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

Side by Side Diff: webkit/glue/resource_fetcher.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
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 #include "webkit/glue/resource_fetcher.h" 5 #include "webkit/glue/resource_fetcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 RunCallback(WebURLResponse(), std::string()); 120 RunCallback(WebURLResponse(), std::string());
121 } 121 }
122 122
123 ///////////////////////////////////////////////////////////////////////////// 123 /////////////////////////////////////////////////////////////////////////////
124 // A resource fetcher with a timeout 124 // A resource fetcher with a timeout
125 125
126 ResourceFetcherWithTimeout::ResourceFetcherWithTimeout( 126 ResourceFetcherWithTimeout::ResourceFetcherWithTimeout(
127 const GURL& url, WebFrame* frame, WebURLRequest::TargetType target_type, 127 const GURL& url, WebFrame* frame, WebURLRequest::TargetType target_type,
128 int timeout_secs, Callback* callback) 128 int timeout_secs, Callback* callback)
129 : ResourceFetcher(url, frame, target_type, callback) { 129 : ResourceFetcher(url, frame, target_type, callback) {
130 timeout_timer_.Start(FROM_HERE, TimeDelta::FromSeconds(timeout_secs), this, 130 timeout_timer_.Start(TimeDelta::FromSeconds(timeout_secs), this,
131 &ResourceFetcherWithTimeout::TimeoutFired); 131 &ResourceFetcherWithTimeout::TimeoutFired);
132 } 132 }
133 133
134 ResourceFetcherWithTimeout::~ResourceFetcherWithTimeout() { 134 ResourceFetcherWithTimeout::~ResourceFetcherWithTimeout() {
135 } 135 }
136 136
137 void ResourceFetcherWithTimeout::TimeoutFired() { 137 void ResourceFetcherWithTimeout::TimeoutFired() {
138 if (!completed_) { 138 if (!completed_) {
139 loader_->cancel(); 139 loader_->cancel();
140 didFail(NULL, WebURLError()); 140 didFail(NULL, WebURLError());
141 } 141 }
142 } 142 }
143 143
144 } // namespace webkit_glue 144 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/fileapi/obfuscated_file_system_file_util.cc ('k') | webkit/glue/resource_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698