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

Side by Side Diff: webkit/glue/resource_fetcher.h

Issue 7087028: roll clang 131935:132017 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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) 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 // A wrapper around ResourceHandle and ResourceHandleClient that simplifies 5 // A wrapper around ResourceHandle and ResourceHandleClient that simplifies
6 // the download of an HTTP object. The interface is modeled after URLFetcher 6 // the download of an HTTP object. The interface is modeled after URLFetcher
7 // in the /chrome/browser. 7 // in the /chrome/browser.
8 // 8 //
9 // ResourceFetcher::Delegate::OnURLFetchComplete will be called async after 9 // ResourceFetcher::Delegate::OnURLFetchComplete will be called async after
10 // the ResourceFetcher object is created. 10 // the ResourceFetcher object is created.
(...skipping 27 matching lines...) Expand all
38 // This will be called when the URL has been fetched, successfully or not. 38 // This will be called when the URL has been fetched, successfully or not.
39 // If there is a failure, response and data will both be empty. |response| 39 // If there is a failure, response and data will both be empty. |response|
40 // and |data| are both valid until the URLFetcher instance is destroyed. 40 // and |data| are both valid until the URLFetcher instance is destroyed.
41 typedef Callback2<const WebKit::WebURLResponse&, 41 typedef Callback2<const WebKit::WebURLResponse&,
42 const std::string&>::Type Callback; 42 const std::string&>::Type Callback;
43 43
44 // We need a frame to make requests. 44 // We need a frame to make requests.
45 ResourceFetcher( 45 ResourceFetcher(
46 const GURL& url, WebKit::WebFrame* frame, 46 const GURL& url, WebKit::WebFrame* frame,
47 WebKit::WebURLRequest::TargetType target_type, Callback* callback); 47 WebKit::WebURLRequest::TargetType target_type, Callback* callback);
48 ~ResourceFetcher(); 48 virtual ~ResourceFetcher();
49 49
50 // Stop the request and don't call the callback. 50 // Stop the request and don't call the callback.
51 void Cancel(); 51 void Cancel();
52 52
53 bool completed() const { return completed_; } 53 bool completed() const { return completed_; }
54 54
55 protected: 55 protected:
56 // WebURLLoaderClient methods: 56 // WebURLLoaderClient methods:
57 virtual void willSendRequest( 57 virtual void willSendRequest(
58 WebKit::WebURLLoader* loader, WebKit::WebURLRequest& new_request, 58 WebKit::WebURLLoader* loader, WebKit::WebURLRequest& new_request,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // kill the request. 121 // kill the request.
122 void TimeoutFired(); 122 void TimeoutFired();
123 123
124 // Limit how long we wait for the alternate error page server. 124 // Limit how long we wait for the alternate error page server.
125 base::OneShotTimer<ResourceFetcherWithTimeout> timeout_timer_; 125 base::OneShotTimer<ResourceFetcherWithTimeout> timeout_timer_;
126 }; 126 };
127 127
128 } // namespace webkit_glue 128 } // namespace webkit_glue
129 129
130 #endif // WEBKIT_GLUE_RESOURCE_FETCHER_H_ 130 #endif // WEBKIT_GLUE_RESOURCE_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698