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

Unified Diff: chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc

Issue 610223002: [SyncFS] Use nullptr instead of NULL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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: chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
index 144917b42f6f7aafbc9e63fd01c44b37d7f45067..27173acee43772528b77371334ca277ae902da5a 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
@@ -82,7 +82,7 @@ class LocalFileSyncContextTest : public testing::Test {
SyncFileMetadata* metadata,
FileChangeList* changes,
storage::ScopedFile* snapshot) {
- ASSERT_TRUE(changes != NULL);
+ ASSERT_TRUE(changes != nullptr);
ASSERT_FALSE(has_inflight_prepare_for_sync_);
status_ = SYNC_STATUS_UNKNOWN;
has_inflight_prepare_for_sync_ = true;
@@ -149,7 +149,7 @@ class LocalFileSyncContextTest : public testing::Test {
EXPECT_EQ(SYNC_STATUS_OK,
PrepareForSync(file_system_context, url,
LocalFileSyncContext::SYNC_EXCLUSIVE,
- &metadata, &changes, NULL));
+ &metadata, &changes, nullptr));
EXPECT_EQ(expected_file_type, metadata.file_type);
status_ = SYNC_STATUS_UNKNOWN;
@@ -174,7 +174,7 @@ class LocalFileSyncContextTest : public testing::Test {
void StartModifyFileOnIOThread(CannedSyncableFileSystem* file_system,
const FileSystemURL& url) {
- ASSERT_TRUE(file_system != NULL);
+ ASSERT_TRUE(file_system != nullptr);
if (!io_task_runner_->RunsTasksOnCurrentThread()) {
async_modify_finished_ = false;
ASSERT_TRUE(ui_task_runner_->RunsTasksOnCurrentThread());
@@ -249,7 +249,7 @@ class LocalFileSyncContextTest : public testing::Test {
FileChangeList changes;
EXPECT_EQ(SYNC_STATUS_OK,
PrepareForSync(file_system.file_system_context(), kFile,
- sync_mode, &metadata, &changes, NULL));
+ sync_mode, &metadata, &changes, nullptr));
EXPECT_EQ(1U, changes.size());
EXPECT_TRUE(changes.list().back().IsFile());
EXPECT_TRUE(changes.list().back().IsAddOrUpdate());
@@ -274,7 +274,7 @@ class LocalFileSyncContextTest : public testing::Test {
}
sync_context_->ShutdownOnUIThread();
- sync_context_ = NULL;
+ sync_context_ = nullptr;
file_system.TearDown();
}
@@ -339,7 +339,7 @@ class LocalFileSyncContextTest : public testing::Test {
EXPECT_TRUE(changes.list().back().IsAddOrUpdate());
sync_context_->ShutdownOnUIThread();
- sync_context_ = NULL;
+ sync_context_ = nullptr;
file_system.TearDown();
}
@@ -387,8 +387,8 @@ TEST_F(LocalFileSyncContextTest, InitializeFileSystemContext) {
// Make sure everything's set up for file_system to be able to handle
// syncable file system operations.
- EXPECT_TRUE(file_system.backend()->sync_context() != NULL);
- EXPECT_TRUE(file_system.backend()->change_tracker() != NULL);
+ EXPECT_TRUE(file_system.backend()->sync_context() != nullptr);
+ EXPECT_TRUE(file_system.backend()->change_tracker() != nullptr);
EXPECT_EQ(sync_context_.get(), file_system.backend()->sync_context());
// Calling MaybeInitialize for the same context multiple times must be ok.
@@ -475,7 +475,7 @@ TEST_F(LocalFileSyncContextTest, MultipleFileSystemContexts) {
EXPECT_EQ(SYNC_STATUS_OK,
PrepareForSync(file_system1.file_system_context(), kURL1,
LocalFileSyncContext::SYNC_EXCLUSIVE,
- &metadata, &changes, NULL));
+ &metadata, &changes, nullptr));
EXPECT_EQ(1U, changes.size());
EXPECT_TRUE(changes.list().back().IsFile());
EXPECT_TRUE(changes.list().back().IsAddOrUpdate());
@@ -486,7 +486,7 @@ TEST_F(LocalFileSyncContextTest, MultipleFileSystemContexts) {
EXPECT_EQ(SYNC_STATUS_OK,
PrepareForSync(file_system2.file_system_context(), kURL2,
LocalFileSyncContext::SYNC_EXCLUSIVE,
- &metadata, &changes, NULL));
+ &metadata, &changes, nullptr));
EXPECT_EQ(1U, changes.size());
EXPECT_FALSE(changes.list().back().IsFile());
EXPECT_TRUE(changes.list().back().IsAddOrUpdate());
@@ -494,7 +494,7 @@ TEST_F(LocalFileSyncContextTest, MultipleFileSystemContexts) {
EXPECT_EQ(0, metadata.size);
sync_context_->ShutdownOnUIThread();
- sync_context_ = NULL;
+ sync_context_ = nullptr;
file_system1.TearDown();
file_system2.TearDown();
@@ -561,7 +561,7 @@ TEST_F(LocalFileSyncContextTest, DISABLED_PrepareSyncWhileWriting) {
EXPECT_EQ(SYNC_STATUS_FILE_BUSY,
PrepareForSync(file_system.file_system_context(), kURL1,
LocalFileSyncContext::SYNC_EXCLUSIVE,
- &metadata, &changes, NULL));
+ &metadata, &changes, nullptr));
EXPECT_EQ(SYNC_FILE_TYPE_FILE, metadata.file_type);
// Register PrepareForSync method to be invoked when kURL1 becomes
@@ -572,7 +572,7 @@ TEST_F(LocalFileSyncContextTest, DISABLED_PrepareSyncWhileWriting) {
sync_context_->RegisterURLForWaitingSync(
kURL1, GetPrepareForSyncClosure(file_system.file_system_context(), kURL1,
LocalFileSyncContext::SYNC_EXCLUSIVE,
- &metadata, &changes, NULL));
+ &metadata, &changes, nullptr));
// Wait for the completion.
EXPECT_EQ(base::File::FILE_OK, WaitUntilModifyFileIsDone());
@@ -591,7 +591,7 @@ TEST_F(LocalFileSyncContextTest, DISABLED_PrepareSyncWhileWriting) {
EXPECT_EQ(1, metadata.size);
sync_context_->ShutdownOnUIThread();
- sync_context_ = NULL;
+ sync_context_ = nullptr;
file_system.TearDown();
}
@@ -679,7 +679,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion) {
EXPECT_EQ(new_usage, initial_usage);
sync_context_->ShutdownOnUIThread();
- sync_context_ = NULL;
+ sync_context_ = nullptr;
file_system.TearDown();
}
@@ -746,7 +746,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion_ForRoot) {
EXPECT_EQ(new_usage, initial_usage);
sync_context_->ShutdownOnUIThread();
- sync_context_ = NULL;
+ sync_context_ = nullptr;
file_system.TearDown();
}

Powered by Google App Engine
This is Rietveld 408576698