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

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

Issue 501183003: Remove implicit conversions from scoped_refptr to T* in content/browser/indexed_db/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 423d2748dc3ca658b2005315c9ea71f919f2729a..069ade5db2d18806d64791b1ea3250b1154ed2be 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.cc
+++ b/content/browser/indexed_db/indexed_db_factory_impl.cc
@@ -193,7 +193,7 @@ void IndexedDBFactoryImpl::GetDatabaseNames(
&data_loss_message,
&disk_full,
&s);
- if (!backing_store) {
+ if (!backing_store.get()) {
callbacks->OnError(
IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError,
"Internal error opening backing store for "
@@ -247,7 +247,7 @@ void IndexedDBFactoryImpl::DeleteDatabase(
&data_loss_message,
&disk_full,
&s);
- if (!backing_store) {
+ if (!backing_store.get()) {
IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
ASCIIToUTF16(
"Internal error opening backing store "
@@ -260,8 +260,8 @@ void IndexedDBFactoryImpl::DeleteDatabase(
}
scoped_refptr<IndexedDBDatabase> database = IndexedDBDatabase::Create(
- name, backing_store, this, unique_identifier, &s);
- if (!database) {
+ name, backing_store.get(), this, unique_identifier, &s);
+ if (!database.get()) {
IndexedDBDatabaseError error(
blink::WebIDBDatabaseExceptionUnknownError,
ASCIIToUTF16(
@@ -275,7 +275,7 @@ void IndexedDBFactoryImpl::DeleteDatabase(
return;
}
- database_map_[unique_identifier] = database;
+ database_map_[unique_identifier] = database.get();
origin_dbs_.insert(std::make_pair(origin_url, database));
database->DeleteDatabase(callbacks);
RemoveDatabaseFromMaps(unique_identifier);
@@ -435,7 +435,7 @@ void IndexedDBFactoryImpl::Open(const base::string16& name,
&data_loss_message,
&disk_full,
&s);
- if (!backing_store) {
+ if (!backing_store.get()) {
if (disk_full) {
connection.callbacks->OnError(
IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionQuotaError,
@@ -456,8 +456,8 @@ void IndexedDBFactoryImpl::Open(const base::string16& name,
}
database = IndexedDBDatabase::Create(
- name, backing_store, this, unique_identifier, &s);
- if (!database) {
+ name, backing_store.get(), this, unique_identifier, &s);
+ if (!database.get()) {
DLOG(ERROR) << "Unable to create the database";
IndexedDBDatabaseError error(blink::WebIDBDatabaseExceptionUnknownError,
ASCIIToUTF16(
@@ -481,7 +481,7 @@ void IndexedDBFactoryImpl::Open(const base::string16& name,
database->OpenConnection(connection);
if (!was_open && database->ConnectionCount() > 0) {
- database_map_[unique_identifier] = database;
+ database_map_[unique_identifier] = database.get();
origin_dbs_.insert(std::make_pair(origin_url, database));
}
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/indexed_db_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698