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 <[email protected]>
Commit-Queue: Ivan Kotenkov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#511144}
diff --git a/components/variations/variations_associated_data_unittest.cc b/components/variations/variations_associated_data_unittest.cc
index 221be57a..e731dc4c 100644
--- a/components/variations/variations_associated_data_unittest.cc
+++ b/components/variations/variations_associated_data_unittest.cc
@@ -37,8 +37,7 @@
 
 class VariationsAssociatedDataTest : public ::testing::Test {
  public:
-  VariationsAssociatedDataTest() : field_trial_list_(NULL) {
-  }
+  VariationsAssociatedDataTest() : field_trial_list_(nullptr) {}
 
   ~VariationsAssociatedDataTest() override {
     // Ensure that the maps are cleared between tests, since they are stored as
@@ -71,7 +70,7 @@
   const std::string non_default_name = "non_default";
 
   scoped_refptr<base::FieldTrial> trial(
-      CreateFieldTrial("trial", 100, default_name, NULL));
+      CreateFieldTrial("trial", 100, default_name, nullptr));
 
   trial->AppendGroup(non_default_name, 100);
   AssociateGoogleVariationID(GOOGLE_WEB_PROPERTIES, trial->trial_name(),
@@ -87,7 +86,7 @@
 TEST_F(VariationsAssociatedDataTest, AssociateGoogleVariationID) {
   const std::string default_name1 = "default";
   scoped_refptr<base::FieldTrial> trial_true(
-      CreateFieldTrial("d1", 10, default_name1, NULL));
+      CreateFieldTrial("d1", 10, default_name1, nullptr));
   const std::string winner = "TheWinner";
   int winner_group = trial_true->AppendGroup(winner, 10);
 
@@ -104,7 +103,7 @@
 
   const std::string default_name2 = "default2";
   scoped_refptr<base::FieldTrial> trial_false(
-      CreateFieldTrial("d2", 10, default_name2, NULL));
+      CreateFieldTrial("d2", 10, default_name2, nullptr));
   const std::string loser = "ALoser";
   const int loser_group = trial_false->AppendGroup(loser, 0);
 
@@ -123,7 +122,7 @@
 TEST_F(VariationsAssociatedDataTest, NoAssociation) {
   const std::string default_name = "default";
   scoped_refptr<base::FieldTrial> no_id_trial(
-      CreateFieldTrial("d3", 10, default_name, NULL));
+      CreateFieldTrial("d3", 10, default_name, nullptr));
 
   const std::string winner = "TheWinner";
   const int winner_group = no_id_trial->AppendGroup(winner, 10);