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

Unified Diff: content/browser/indexed_db/indexed_db_factory_impl.cc

Issue 1832553002: IndexedDB: Pass url::Origin rather than GURL over IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@origin-wdb
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_factory_impl.cc
diff --git a/content/browser/indexed_db/indexed_db_factory_impl.cc b/content/browser/indexed_db/indexed_db_factory_impl.cc
index 33db01f70fe1cc290ade39c09a21b490d2078e33..6f7e4d699bf5d3e384fcbedde811d4ed5abad5fb 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.cc
+++ b/content/browser/indexed_db/indexed_db_factory_impl.cc
@@ -174,7 +174,7 @@ void IndexedDBFactoryImpl::ReportOutstandingBlobs(const GURL& origin_url,
void IndexedDBFactoryImpl::GetDatabaseNames(
scoped_refptr<IndexedDBCallbacks> callbacks,
- const GURL& origin_url,
+ const url::Origin& origin,
const base::FilePath& data_directory,
net::URLRequestContext* request_context) {
IDB_TRACE("IndexedDBFactoryImpl::GetDatabaseNames");
@@ -182,6 +182,7 @@ void IndexedDBFactoryImpl::GetDatabaseNames(
blink::WebIDBDataLoss data_loss;
std::string data_loss_message;
bool disk_full;
+ GURL origin_url(origin.Serialize());
leveldb::Status s;
// TODO(cmumford): Handle this error
scoped_refptr<IndexedDBBackingStore> backing_store =
@@ -221,9 +222,10 @@ void IndexedDBFactoryImpl::DeleteDatabase(
const base::string16& name,
net::URLRequestContext* request_context,
scoped_refptr<IndexedDBCallbacks> callbacks,
- const GURL& origin_url,
+ const url::Origin& origin,
const base::FilePath& data_directory) {
IDB_TRACE("IndexedDBFactoryImpl::DeleteDatabase");
+ GURL origin_url(origin.Serialize());
IndexedDBDatabase::Identifier unique_identifier(origin_url, name);
IndexedDBDatabaseMap::iterator it = database_map_.find(unique_identifier);
if (it != database_map_.end()) {
@@ -433,10 +435,11 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBFactoryImpl::OpenBackingStore(
void IndexedDBFactoryImpl::Open(const base::string16& name,
const IndexedDBPendingConnection& connection,
net::URLRequestContext* request_context,
- const GURL& origin_url,
+ const url::Origin& origin,
const base::FilePath& data_directory) {
IDB_TRACE("IndexedDBFactoryImpl::Open");
scoped_refptr<IndexedDBDatabase> database;
+ GURL origin_url(origin.Serialize());
IndexedDBDatabase::Identifier unique_identifier(origin_url, name);
IndexedDBDatabaseMap::iterator it = database_map_.find(unique_identifier);
blink::WebIDBDataLoss data_loss =

Powered by Google App Engine
This is Rietveld 408576698