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

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

Issue 149295: Don't forget to free the callbacks! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 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/glue/image_resource_fetcher.cc ('k') | webkit/glue/resource_fetcher.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual void didFinishLoading(WebKit::WebURLLoader* loader); 65 virtual void didFinishLoading(WebKit::WebURLLoader* loader);
66 virtual void didFail( 66 virtual void didFail(
67 WebKit::WebURLLoader* loader, const WebKit::WebURLError& error); 67 WebKit::WebURLLoader* loader, const WebKit::WebURLError& error);
68 68
69 scoped_ptr<WebKit::WebURLLoader> loader_; 69 scoped_ptr<WebKit::WebURLLoader> loader_;
70 70
71 // URL we're fetching 71 // URL we're fetching
72 GURL url_; 72 GURL url_;
73 73
74 // Callback when we're done 74 // Callback when we're done
75 Callback* callback_; 75 scoped_ptr<Callback> callback_;
76 76
77 // A copy of the original resource response 77 // A copy of the original resource response
78 WebKit::WebURLResponse response_; 78 WebKit::WebURLResponse response_;
79 79
80 // Set to true once the request is compelte. 80 // Set to true once the request is compelte.
81 bool completed_; 81 bool completed_;
82 82
83 private: 83 private:
84 // Start the actual download. 84 // Start the actual download.
85 void Start(WebFrame* frame); 85 void Start(WebFrame* frame);
(...skipping 16 matching lines...) Expand all
102 // kill the request. 102 // kill the request.
103 void TimeoutFired(); 103 void TimeoutFired();
104 104
105 // Limit how long we wait for the alternate error page server. 105 // Limit how long we wait for the alternate error page server.
106 base::OneShotTimer<ResourceFetcherWithTimeout> timeout_timer_; 106 base::OneShotTimer<ResourceFetcherWithTimeout> timeout_timer_;
107 }; 107 };
108 108
109 } // namespace webkit_glue 109 } // namespace webkit_glue
110 110
111 #endif // WEBKIT_GLUE_RESOURCE_FETCHER_H_ 111 #endif // WEBKIT_GLUE_RESOURCE_FETCHER_H_
OLDNEW
« no previous file with comments | « webkit/glue/image_resource_fetcher.cc ('k') | webkit/glue/resource_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698