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

Side by Side Diff: content/browser/loader/resource_handler.h

Issue 1301103002: moved upload progress logic from ResourceLoader to AsyncResourceHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: single quotes, nits, and return success on success Created 5 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
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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the RenderProcessHosts, and dispatches them to URLRequests. It then 6 // from the RenderProcessHosts, and dispatches them to URLRequests. It then
7 // fowards the messages from the URLRequests back to the correct process for 7 // fowards the messages from the URLRequests back to the correct process for
8 // handling. 8 // handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 27 matching lines...) Expand all
38 // for an URLRequest instance. A ResourceHandler's lifetime is bound to its 38 // for an URLRequest instance. A ResourceHandler's lifetime is bound to its
39 // associated URLRequest. 39 // associated URLRequest.
40 class CONTENT_EXPORT ResourceHandler 40 class CONTENT_EXPORT ResourceHandler
41 : public NON_EXPORTED_BASE(base::NonThreadSafe) { 41 : public NON_EXPORTED_BASE(base::NonThreadSafe) {
42 public: 42 public:
43 virtual ~ResourceHandler() {} 43 virtual ~ResourceHandler() {}
44 44
45 // Sets the controller for this handler. 45 // Sets the controller for this handler.
46 virtual void SetController(ResourceController* controller); 46 virtual void SetController(ResourceController* controller);
47 47
48 // Called as upload progress is made. The return value is ignored.
49 virtual bool OnUploadProgress(uint64 position, uint64 size) = 0;
50
51 // The request was redirected to a new URL. |*defer| has an initial value of 48 // The request was redirected to a new URL. |*defer| has an initial value of
52 // false. Set |*defer| to true to defer the redirect. The redirect may be 49 // false. Set |*defer| to true to defer the redirect. The redirect may be
53 // followed later on via ResourceDispatcherHost::FollowDeferredRedirect. If 50 // followed later on via ResourceDispatcherHost::FollowDeferredRedirect. If
54 // the handler returns false, then the request is cancelled. 51 // the handler returns false, then the request is cancelled.
55 virtual bool OnRequestRedirected(const net::RedirectInfo& redirect_info, 52 virtual bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
56 ResourceResponse* response, 53 ResourceResponse* response,
57 bool* defer) = 0; 54 bool* defer) = 0;
58 55
59 // Response headers and meta data are available. If the handler returns 56 // Response headers and meta data are available. If the handler returns
60 // false, then the request is cancelled. Set |*defer| to true to defer 57 // false, then the request is cancelled. Set |*defer| to true to defer
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 ResourceMessageFilter* GetFilter() const; 120 ResourceMessageFilter* GetFilter() const;
124 121
125 private: 122 private:
126 ResourceController* controller_; 123 ResourceController* controller_;
127 net::URLRequest* request_; 124 net::URLRequest* request_;
128 }; 125 };
129 126
130 } // namespace content 127 } // namespace content
131 128
132 #endif // CONTENT_BROWSER_LOADER_RESOURCE_HANDLER_H_ 129 #endif // CONTENT_BROWSER_LOADER_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698