Commit 9165a15f authored by Adrienne Walker's avatar Adrienne Walker Committed by Commit Bot

indexeddb: convert NULL to nullptr

This is some more "pre cleanup" of code that the linter complains about
when moving code into storage service.  Doing this ahead of time to
make the future gigantic move CL easier to reason about.

Bug: 1015214
Change-Id: I7dcd977b7906710a7516412a11d83d64661d19fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093051
Auto-Submit: enne <enne@chromium.org>
Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748860}
parent 8a07a4a8
...@@ -247,11 +247,13 @@ class CONTENT_EXPORT IndexedDBBackingStore { ...@@ -247,11 +247,13 @@ class CONTENT_EXPORT IndexedDBBackingStore {
}; };
const blink::IndexedDBKey& key() const { return *current_key_; } const blink::IndexedDBKey& key() const { return *current_key_; }
bool Continue(leveldb::Status* s) { return Continue(NULL, NULL, SEEK, s); } bool Continue(leveldb::Status* s) {
return Continue(nullptr, nullptr, SEEK, s);
}
bool Continue(const blink::IndexedDBKey* key, bool Continue(const blink::IndexedDBKey* key,
IteratorState state, IteratorState state,
leveldb::Status* s) { leveldb::Status* s) {
return Continue(key, NULL, state, s); return Continue(key, nullptr, state, s);
} }
bool Continue(const blink::IndexedDBKey* key, bool Continue(const blink::IndexedDBKey* key,
const blink::IndexedDBKey* primary_key, const blink::IndexedDBKey* primary_key,
......
...@@ -117,7 +117,7 @@ class CONTENT_EXPORT IndexedDBConnection { ...@@ -117,7 +117,7 @@ class CONTENT_EXPORT IndexedDBConnection {
base::flat_map<int64_t, std::unique_ptr<IndexedDBTransaction>> transactions_; base::flat_map<int64_t, std::unique_ptr<IndexedDBTransaction>> transactions_;
// The callbacks_ member is cleared when the connection is closed. // The callbacks_ member is cleared when the connection is closed.
// May be NULL in unit tests. // May be nullptr in unit tests.
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_; scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_;
std::vector<std::unique_ptr<IndexedDBObserver>> active_observers_; std::vector<std::unique_ptr<IndexedDBObserver>> active_observers_;
......
...@@ -48,7 +48,7 @@ class CONTENT_EXPORT IndexedDBCursor { ...@@ -48,7 +48,7 @@ class CONTENT_EXPORT IndexedDBCursor {
return cursor_->primary_key(); return cursor_->primary_key();
} }
IndexedDBValue* Value() const { IndexedDBValue* Value() const {
return (cursor_type_ == indexed_db::CURSOR_KEY_ONLY) ? NULL return (cursor_type_ == indexed_db::CURSOR_KEY_ONLY) ? nullptr
: cursor_->value(); : cursor_->value();
} }
......
...@@ -449,7 +449,7 @@ void IndexedDBFactoryImpl::AbortTransactionsForDatabase( ...@@ -449,7 +449,7 @@ void IndexedDBFactoryImpl::AbortTransactionsForDatabase(
void IndexedDBFactoryImpl::HandleBackingStoreFailure(const Origin& origin) { void IndexedDBFactoryImpl::HandleBackingStoreFailure(const Origin& origin) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// NULL after ContextDestroyed() called, and in some unit tests. // nullptr after ContextDestroyed() called, and in some unit tests.
if (!context_) if (!context_)
return; return;
context_->ForceCloseSync( context_->ForceCloseSync(
...@@ -574,7 +574,7 @@ void IndexedDBFactoryImpl::ReportOutstandingBlobs(const Origin& origin, ...@@ -574,7 +574,7 @@ void IndexedDBFactoryImpl::ReportOutstandingBlobs(const Origin& origin,
void IndexedDBFactoryImpl::BlobFilesCleaned(const url::Origin& origin) { void IndexedDBFactoryImpl::BlobFilesCleaned(const url::Origin& origin) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// NULL after ContextDestroyed() called, and in some unit tests. // nullptr after ContextDestroyed() called, and in some unit tests.
if (!context_) if (!context_)
return; return;
context_->BlobFilesCleaned(origin); context_->BlobFilesCleaned(origin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment