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

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

Issue 1841553002: IndexedDB: Use url::Origin rather than GURL for representing origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@origin-idb
Patch Set: Rebased Created 4 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
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 43e4595cdf969f22d6566e91376ebae981fbd0f5..a18256646b7f02c3263c411e19f3279f119a2f30 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_backing_store.h
@@ -36,6 +36,7 @@
#include "storage/browser/blob/blob_data_handle.h"
#include "third_party/leveldatabase/src/include/leveldb/status.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace base {
class SequencedTaskRunner;
@@ -359,7 +360,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
DISALLOW_COPY_AND_ASSIGN(Cursor);
};
- const GURL& origin_url() const { return origin_url_; }
+ const url::Origin& origin() const { return origin_; }
IndexedDBFactory* factory() const { return indexed_db_factory_; }
base::SequencedTaskRunner* task_runner() const { return task_runner_.get(); }
base::OneShotTimer* close_timer() { return &close_timer_; }
@@ -369,7 +370,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
static scoped_refptr<IndexedDBBackingStore> Open(
IndexedDBFactory* indexed_db_factory,
- const GURL& origin_url,
+ const url::Origin& origin,
const base::FilePath& path_base,
net::URLRequestContext* request_context,
blink::WebIDBDataLoss* data_loss,
@@ -380,7 +381,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
leveldb::Status* status);
static scoped_refptr<IndexedDBBackingStore> Open(
IndexedDBFactory* indexed_db_factory,
- const GURL& origin_url,
+ const url::Origin& origin,
const base::FilePath& path_base,
net::URLRequestContext* request_context,
blink::WebIDBDataLoss* data_loss,
@@ -391,11 +392,11 @@ class CONTENT_EXPORT IndexedDBBackingStore
bool clean_journal,
leveldb::Status* status);
static scoped_refptr<IndexedDBBackingStore> OpenInMemory(
- const GURL& origin_url,
+ const url::Origin& origin,
base::SequencedTaskRunner* task_runner,
leveldb::Status* status);
static scoped_refptr<IndexedDBBackingStore> OpenInMemory(
- const GURL& origin_url,
+ const url::Origin& origin,
LevelDBFactory* leveldb_factory,
base::SequencedTaskRunner* task_runner,
leveldb::Status* status);
@@ -420,9 +421,9 @@ class CONTENT_EXPORT IndexedDBBackingStore
// Assumes caller has already closed the backing store.
static leveldb::Status DestroyBackingStore(const base::FilePath& path_base,
- const GURL& origin_url);
+ const url::Origin& origin);
static bool RecordCorruptionInfo(const base::FilePath& path_base,
- const GURL& origin_url,
+ const url::Origin& origin,
const std::string& message);
leveldb::Status GetObjectStores(
int64_t database_id,
@@ -563,7 +564,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
friend class base::RefCounted<IndexedDBBackingStore>;
IndexedDBBackingStore(IndexedDBFactory* indexed_db_factory,
- const GURL& origin_url,
+ const url::Origin& origin,
const base::FilePath& blob_path,
net::URLRequestContext* request_context,
std::unique_ptr<LevelDBDatabase> db,
@@ -597,7 +598,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
private:
static scoped_refptr<IndexedDBBackingStore> Create(
IndexedDBFactory* indexed_db_factory,
- const GURL& origin_url,
+ const url::Origin& origin,
const base::FilePath& blob_path,
net::URLRequestContext* request_context,
std::unique_ptr<LevelDBDatabase> db,
@@ -606,7 +607,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
leveldb::Status* status);
static bool ReadCorruptionInfo(const base::FilePath& path_base,
- const GURL& origin_url,
+ const url::Origin& origin,
std::string* message);
leveldb::Status FindKeyInIndex(
@@ -638,7 +639,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
const BlobJournalType& journal) const;
IndexedDBFactory* indexed_db_factory_;
- const GURL origin_url_;
+ const url::Origin origin_;
base::FilePath blob_path_;
// The origin identifier is a key prefix unique to the origin used in the

Powered by Google App Engine
This is Rietveld 408576698