Rename base::Process::pid() to Pid()

The method is not a simple accessor.

BUG=417532

[email protected] (chromeos)
[email protected] (browser_watcher)
[email protected] (nacl)
[email protected] (content)
[email protected] (sandbox)
[email protected] (ui)

Review URL: https://codereview.chromium.org/864163003

Cr-Commit-Position: refs/heads/master@{#312978}
diff --git a/components/browser_watcher/exit_code_watcher_win.cc b/components/browser_watcher/exit_code_watcher_win.cc
index 218978c..0e231847 100644
--- a/components/browser_watcher/exit_code_watcher_win.cc
+++ b/components/browser_watcher/exit_code_watcher_win.cc
@@ -30,7 +30,12 @@
 }
 
 bool ExitCodeWatcher::Initialize(base::Process process) {
-  DWORD process_pid = process.pid();
+  if (!process.IsValid()) {
+    LOG(ERROR) << "Invalid parent handle, can't get parent process ID.";
+    return false;
+  }
+
+  DWORD process_pid = process.Pid();
   if (process_pid == 0) {
     LOG(ERROR) << "Invalid parent handle, can't get parent process ID.";
     return false;
@@ -44,7 +49,7 @@
     return false;
   }
 
-  // Success, take ownership of the process handle.
+  // Success, take ownership of the process.
   process_ = process.Pass();
   process_creation_time_ = base::Time::FromFileTime(creation_time);
 
@@ -68,7 +73,7 @@
                         registry_path_.c_str(),
                         KEY_WRITE);
   base::string16 value_name(
-      GetValueName(process_creation_time_, process_.pid()));
+      GetValueName(process_creation_time_, process_.Pid()));
 
   ULONG result = key.WriteValue(value_name.c_str(), exit_code);
   if (result != ERROR_SUCCESS) {