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

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

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: webkit/browser/blob/mock_blob_url_request_context.h
diff --git a/webkit/browser/blob/mock_blob_url_request_context.h b/webkit/browser/blob/mock_blob_url_request_context.h
index b89027c95e7c07c3ced8acb550a9cef39448c32c..a5d1acc8a4c4ce671f321555b6d76231feb2a56a 100644
--- a/webkit/browser/blob/mock_blob_url_request_context.h
+++ b/webkit/browser/blob/mock_blob_url_request_context.h
@@ -15,34 +15,40 @@ class FileSystemContext;
namespace webkit_blob {
-class BlobStorageController;
+class BlobDataHandle;
+class BlobStorageContext;
class MockBlobURLRequestContext : public net::URLRequestContext {
public:
MockBlobURLRequestContext(fileapi::FileSystemContext* file_system_context);
virtual ~MockBlobURLRequestContext();
- BlobStorageController* blob_storage_controller() const {
- return blob_storage_controller_.get();
+ BlobStorageContext* blob_storage_context() const {
+ return blob_storage_context_.get();
}
private:
net::URLRequestJobFactoryImpl job_factory_;
- scoped_ptr<BlobStorageController> blob_storage_controller_;
+ scoped_ptr<BlobStorageContext> blob_storage_context_;
DISALLOW_COPY_AND_ASSIGN(MockBlobURLRequestContext);
};
class ScopedTextBlob {
public:
+ // Registers a blob with the given |id| that contains |data|.
ScopedTextBlob(const MockBlobURLRequestContext& request_context,
- const GURL& blob_url,
+ const std::string& blob_id,
const std::string& data);
~ScopedTextBlob();
+ // Returns a BlobDataHandle referring to the scoped blob.
+ scoped_ptr<BlobDataHandle> GetBlobDataHandle();
+
private:
- const GURL blob_url_;
- BlobStorageController* blob_storage_controller_;
+ const std::string blob_id_;
+ BlobStorageContext* context_;
+ scoped_ptr<BlobDataHandle> handle_;
DISALLOW_COPY_AND_ASSIGN(ScopedTextBlob);
};
« no previous file with comments | « webkit/browser/blob/blob_url_request_job_factory.cc ('k') | webkit/browser/blob/mock_blob_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698