diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 18:29:24 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 18:29:24 +0000 |
commit | 22339b123c68805c7c293c67f6f47ea45f0fd1a1 (patch) | |
tree | bb05e2e3eb0362338e921a4dce9d5c350437326e /webkit/blob/blob_storage_controller.h | |
parent | e840afdedd33728491639312a268fbf37a48f078 (diff) | |
download | chromium_src-22339b123c68805c7c293c67f6f47ea45f0fd1a1.zip chromium_src-22339b123c68805c7c293c67f6f47ea45f0fd1a1.tar.gz chromium_src-22339b123c68805c7c293c67f6f47ea45f0fd1a1.tar.bz2 |
Support sending BlobData to browser process. Also support sending UploadData
with the blob info to browser process.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3108042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob/blob_storage_controller.h')
-rw-r--r-- | webkit/blob/blob_storage_controller.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/webkit/blob/blob_storage_controller.h b/webkit/blob/blob_storage_controller.h new file mode 100644 index 0000000..dd98f18 --- /dev/null +++ b/webkit/blob/blob_storage_controller.h @@ -0,0 +1,43 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_ +#define WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_ + +#include "base/hash_tables.h" +#include "base/process.h" +#include "base/ref_counted.h" + +class GURL; + +namespace webkit_blob { + +class BlobData; + +// This class handles the logistics of blob Storage within the browser process. +class BlobStorageController { + public: + BlobStorageController(); + ~BlobStorageController(); + + void RegisterBlobUrl(const GURL& url, const BlobData* blob_data); + void RegisterBlobUrlFrom(const GURL& url, const GURL& src_url); + void UnregisterBlobUrl(const GURL& url); + BlobData* GetBlobDataFromUrl(const GURL& url); + + private: + void AppendStorageItems(BlobData* target_blob_data, + BlobData* src_blob_data, + uint64 offset, + uint64 length); + + typedef base::hash_map<std::string, scoped_refptr<BlobData> > BlobMap; + BlobMap blob_map_; + + DISALLOW_COPY_AND_ASSIGN(BlobStorageController); +}; + +} // namespace webkit_blob + +#endif // WEBKIT_BLOB_BLOB_STORAGE_CONTROLLER_H_ |