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

Unified Diff: webkit/blob/mock_blob_url_request_context.h

Issue 11416382: ********** Content tests with blob hacking. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « webkit/blob/blob_url_request_job_unittest.cc ('k') | webkit/blob/mock_blob_url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/blob/mock_blob_url_request_context.h
===================================================================
--- webkit/blob/mock_blob_url_request_context.h (revision 186525)
+++ webkit/blob/mock_blob_url_request_context.h (working copy)
@@ -15,34 +15,39 @@
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* blob_storage_context_;
DISALLOW_COPY_AND_ASSIGN(ScopedTextBlob);
};
« no previous file with comments | « webkit/blob/blob_url_request_job_unittest.cc ('k') | webkit/blob/mock_blob_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698