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

Unified Diff: content/browser/fileapi/chrome_blob_storage_context.h

Issue 266373006: Blobs: Mechanism for creating Blobs in browser process, then transferring to renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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: content/browser/fileapi/chrome_blob_storage_context.h
diff --git a/content/browser/fileapi/chrome_blob_storage_context.h b/content/browser/fileapi/chrome_blob_storage_context.h
index 641e235300629c6c214693f77c25801a75035b57..51b67a33bba2c4094bbb8c3537b10a5bda9e5cb0 100644
--- a/content/browser/fileapi/chrome_blob_storage_context.h
+++ b/content/browser/fileapi/chrome_blob_storage_context.h
@@ -9,6 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/sequenced_task_runner_helpers.h"
#include "content/common/content_export.h"
+#include "content/public/browser/blob_context.h"
namespace webkit_blob {
class BlobStorageContext;
@@ -26,7 +27,8 @@ struct ChromeBlobStorageContextDeleter;
// All methods, except the ctor, are expected to be called on
// the IO thread (unless specifically called out in doc comments).
class CONTENT_EXPORT ChromeBlobStorageContext
- : public base::RefCountedThreadSafe<ChromeBlobStorageContext,
+ : public BlobContext,
+ public base::RefCountedThreadSafe<ChromeBlobStorageContext,
ChromeBlobStorageContextDeleter> {
public:
ChromeBlobStorageContext();
@@ -40,6 +42,10 @@ class CONTENT_EXPORT ChromeBlobStorageContext
return context_.get();
}
+ // BlobContext implementation.
+ virtual void CreateMemoryBackedBlob(
+ const char* data, size_t length, const BlobCallback& callback) OVERRIDE;
+
protected:
virtual ~ChromeBlobStorageContext();
@@ -49,6 +55,9 @@ class CONTENT_EXPORT ChromeBlobStorageContext
ChromeBlobStorageContextDeleter>;
friend struct ChromeBlobStorageContextDeleter;
+ scoped_ptr<BlobHandle> CreateMemoryBackedBlobOnIOThread(
+ const char* data, size_t length, const BlobCallback& callback);
+
void DeleteOnCorrectThread() const;
scoped_ptr<webkit_blob::BlobStorageContext> context_;

Powered by Google App Engine
This is Rietveld 408576698