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

Unified Diff: webkit/browser/blob/blob_url_request_job_factory.h

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webkit/browser/blob/blob_url_request_job_factory.h
diff --git a/webkit/browser/blob/blob_url_request_job_factory.h b/webkit/browser/blob/blob_url_request_job_factory.h
index 2a78c95d1a6796ae05849d058558951e4b2325d5..64f7f34ff7421878a7a520cf99035a985632d91e 100644
--- a/webkit/browser/blob/blob_url_request_job_factory.h
+++ b/webkit/browser/blob/blob_url_request_job_factory.h
@@ -7,6 +7,8 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "net/url_request/url_request.h"
#include "net/url_request/url_request_job_factory.h"
#include "webkit/browser/webkit_storage_browser_export.h"
@@ -19,20 +21,29 @@ class FileSystemContext;
} // namespace fileapi
namespace net {
-class URLRequest;
+class URLRequestContext;
} // namespace net
namespace webkit_blob {
class BlobData;
-class BlobStorageController;
+class BlobDataHandle;
class WEBKIT_STORAGE_BROWSER_EXPORT BlobProtocolHandler
: public net::URLRequestJobFactory::ProtocolHandler {
public:
- // |controller|'s lifetime should exceed the lifetime of the ProtocolHandler.
- BlobProtocolHandler(BlobStorageController* blob_storage_controller,
- fileapi::FileSystemContext* file_system_context,
+ // A helper to manufacture an URLRequest to retrieve the given blob.
+ static net::URLRequest* CreateBlobRequest(
+ scoped_ptr<BlobDataHandle> blob_data_handle,
+ const net::URLRequestContext* request_context,
+ net::URLRequest::Delegate* request_delegate);
+
+ // This class does not lookup based on the request's url value.
+ static void SetRequestedBlobDataHandle(
+ net::URLRequest* request,
+ scoped_ptr<BlobDataHandle> blob_data_handle);
+
+ BlobProtocolHandler(fileapi::FileSystemContext* file_system_context,
base::MessageLoopProxy* file_loop_proxy);
virtual ~BlobProtocolHandler();
@@ -41,12 +52,9 @@ class WEBKIT_STORAGE_BROWSER_EXPORT BlobProtocolHandler
net::NetworkDelegate* network_delegate) const OVERRIDE;
private:
- virtual scoped_refptr<BlobData> LookupBlobData(
+ scoped_refptr<BlobData> LookupBlobData(
net::URLRequest* request) const;
- // No scoped_refptr because |blob_storage_controller_| is owned by the
- // ProfileIOData, which also owns this ProtocolHandler.
- BlobStorageController* const blob_storage_controller_;
const scoped_refptr<fileapi::FileSystemContext> file_system_context_;
const scoped_refptr<base::MessageLoopProxy> file_loop_proxy_;

Powered by Google App Engine
This is Rietveld 408576698