Convert 0 and NULL to nullptr in components.

Steps to replicate:
1. Build clang-tidy and clang-apply-replacements as described here: https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
2. Build targets necessary for the change in out/gn.
3. Generate the compilation database:
  tools/clang/scripts/generate_compdb.py -p out/gn > compile_commands.json
4. Run clang-tidy and apply replacements:
  cd out/gn && PATH_TO_RUN_CLANG_TIDY/run-clang-tidy.py -p ../../ -clang-tidy-binary PATH_TO_CLANG_TIDY_BINARY -clang-apply-replacements-binary PATH_TO_CLANG_APPLY_REPLACEMENTS_BINARY -checks=-*,modernize-use-nullptr -fix -j 8 DIR_TO_CONVERT

Bug: 403854, 776257
Change-Id: Ifd0c147ac6866beacffbddb0c56b20502cb4f127
Reviewed-on: https://chromium-review.googlesource.com/732308
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Ivan Kotenkov <kotenkov@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#511144}
diff --git a/components/prefs/json_pref_store_unittest.cc b/components/prefs/json_pref_store_unittest.cc
index 7546966..4793350 100644
--- a/components/prefs/json_pref_store_unittest.cc
+++ b/components/prefs/json_pref_store_unittest.cc
@@ -84,7 +84,7 @@
   }
   void OnStoreDeletionFromDisk() override {}
 
-  bool has_intercepted_prefs() const { return intercepted_prefs_ != NULL; }
+  bool has_intercepted_prefs() const { return intercepted_prefs_ != nullptr; }
 
   // Finalize an intercepted read, handing |intercepted_prefs_| back to its
   // JsonPrefStore.
@@ -364,7 +364,7 @@
   ASSERT_FALSE(pref_store->ReadOnly());
 
   // Check values.
-  const Value* result = NULL;
+  const Value* result = nullptr;
   EXPECT_TRUE(pref_store->GetValue("list", &result));
   EXPECT_TRUE(ListValue().Equals(result));
   EXPECT_TRUE(pref_store->GetValue("dict", &result));
@@ -386,7 +386,7 @@
   pref_store->RemoveValue("dict.key",
                           WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
 
-  const base::Value* retrieved_dict = NULL;
+  const base::Value* retrieved_dict = nullptr;
   bool has_dict = pref_store->GetValue("dict", &retrieved_dict);
   EXPECT_FALSE(has_dict);
 }
@@ -432,13 +432,13 @@
   // returns.
   EXPECT_TRUE(raw_intercepting_pref_filter_->has_intercepted_prefs());
   EXPECT_FALSE(pref_store->IsInitializationComplete());
-  EXPECT_FALSE(pref_store->GetValue(kHomePage, NULL));
+  EXPECT_FALSE(pref_store->GetValue(kHomePage, nullptr));
 
   raw_intercepting_pref_filter_->ReleasePrefs();
 
   EXPECT_FALSE(raw_intercepting_pref_filter_->has_intercepted_prefs());
   EXPECT_TRUE(pref_store->IsInitializationComplete());
-  EXPECT_TRUE(pref_store->GetValue(kHomePage, NULL));
+  EXPECT_TRUE(pref_store->GetValue(kHomePage, nullptr));
 
   // The JSON file looks like this:
   // {
@@ -484,7 +484,7 @@
     EXPECT_FALSE(pref_store->ReadOnly());
     EXPECT_TRUE(raw_intercepting_pref_filter_->has_intercepted_prefs());
     EXPECT_FALSE(pref_store->IsInitializationComplete());
-    EXPECT_FALSE(pref_store->GetValue(kHomePage, NULL));
+    EXPECT_FALSE(pref_store->GetValue(kHomePage, nullptr));
   }
 
   {
@@ -497,7 +497,7 @@
     EXPECT_FALSE(pref_store->ReadOnly());
     EXPECT_FALSE(raw_intercepting_pref_filter_->has_intercepted_prefs());
     EXPECT_TRUE(pref_store->IsInitializationComplete());
-    EXPECT_TRUE(pref_store->GetValue(kHomePage, NULL));
+    EXPECT_TRUE(pref_store->GetValue(kHomePage, nullptr));
   }
 
   pref_store->RemoveObserver(&mock_observer);