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

Unified Diff: content/browser/indexed_db/indexed_db_backing_store.h

Issue 333533002: Check File snapshots and Blob byte counts when writing to IDB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix Created 6 years, 6 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/indexed_db/indexed_db_backing_store.h
diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h
index 7931f76354323870e6bcde30ba98bfd31ef23bfc..59e381f2fef0dec3734d3b76050fe198ad9f5b6e 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_backing_store.h
@@ -16,6 +16,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
+#include "base/time/time.h"
#include "base/timer/timer.h"
#include "content/browser/indexed_db/indexed_db.h"
#include "content/browser/indexed_db/indexed_db_active_blob_registry.h"
@@ -435,8 +436,11 @@ class CONTENT_EXPORT IndexedDBBackingStore
class WriteDescriptor {
public:
- WriteDescriptor(const GURL& url, int64_t key);
- WriteDescriptor(const base::FilePath& path, int64_t key);
+ WriteDescriptor(const GURL& url, int64_t key, int64_t size);
+ WriteDescriptor(const base::FilePath& path,
+ int64_t key,
+ int64_t size,
+ base::Time last_modified);
bool is_file() const { return is_file_; }
const GURL& url() const {
@@ -448,12 +452,16 @@ class CONTENT_EXPORT IndexedDBBackingStore
return file_path_;
}
int64_t key() const { return key_; }
+ int64_t size() const { return size_; }
+ base::Time last_modified() const { return last_modified_; }
private:
bool is_file_;
GURL url_;
base::FilePath file_path_;
int64_t key_;
+ int64_t size_;
+ base::Time last_modified_;
};
class ChainedBlobWriter : public base::RefCounted<ChainedBlobWriter> {

Powered by Google App Engine
This is Rietveld 408576698