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

Side by Side Diff: content/browser/renderer_host/resource_loader.h

Issue 11270027: Add a ResourceScheduler to ResourceDispatcherHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Manage ownership with handles Created 8 years, 1 month 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) 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_LOADER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_LOADER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_LOADER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_LOADER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/renderer_host/resource_handler.h" 10 #include "content/browser/renderer_host/resource_handler.h"
11 #include "content/browser/ssl/ssl_error_handler.h" 11 #include "content/browser/ssl/ssl_error_handler.h"
12 #include "content/public/browser/resource_controller.h" 12 #include "content/public/browser/resource_controller.h"
13 #include "net/url_request/url_request.h" 13 #include "net/url_request/url_request.h"
14 14
15 namespace content { 15 namespace content {
16 class ResourceDispatcherHostLoginDelegate; 16 class ResourceDispatcherHostLoginDelegate;
17 class ResourceLoaderDelegate; 17 class ResourceLoaderDelegate;
18 class ResourceRequestInfoImpl; 18 class ResourceRequestInfoImpl;
19 class SSLClientAuthHandler; 19 class SSLClientAuthHandler;
20 20
21 // This class is responsible for driving the URLRequest (i.e., calling Start, 21 // This class is responsible for driving the URLRequest (i.e., calling Start,
22 // Read, and servicing events). It has a ResourceHandler, which is typically a 22 // Read, and servicing events). It has a ResourceHandler, which is typically a
23 // chain of ResourceHandlers, and is the ResourceController for its handler. 23 // chain of ResourceHandlers, and is the ResourceController for its handler.
24 class ResourceLoader : public net::URLRequest::Delegate, 24 class ResourceLoader : public net::URLRequest::Delegate,
25 public SSLErrorHandler::Delegate, 25 public SSLErrorHandler::Delegate,
26 public ResourceController { 26 public ResourceController {
27 public: 27 public:
28 ResourceLoader(scoped_ptr<net::URLRequest> request, 28 CONTENT_EXPORT_PRIVATE ResourceLoader(scoped_ptr<net::URLRequest> request,
willchan no longer on Chromium 2012/11/21 09:04:30 Don't we generally just export the whole class? I
James Simonsen 2012/11/27 02:20:51 I saw examples of each. Not sure which is preferre
29 scoped_ptr<ResourceHandler> handler, 29 scoped_ptr<ResourceHandler> handler,
30 ResourceLoaderDelegate* delegate); 30 ResourceLoaderDelegate* delegate);
31 virtual ~ResourceLoader(); 31 virtual ~ResourceLoader();
32 32
33 void StartRequest(); 33 void StartRequest();
34 void CancelRequest(bool from_renderer); 34 void CancelRequest(bool from_renderer);
35 35
36 void ReportUploadProgress(); 36 void ReportUploadProgress();
37 37
38 bool is_transferring() const { return is_transferring_; } 38 bool is_transferring() const { return is_transferring_; }
39 void MarkAsTransferring(); 39 void MarkAsTransferring();
40 void WillCompleteTransfer(); 40 void WillCompleteTransfer();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bool is_transferring_; 115 bool is_transferring_;
116 116
117 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; 117 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_;
118 118
119 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); 119 DISALLOW_COPY_AND_ASSIGN(ResourceLoader);
120 }; 120 };
121 121
122 } // namespace content 122 } // namespace content
123 123
124 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_LOADER_H_ 124 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698