Replace base::hash_map with std::unordered_map

base::hash_map is alias of std::unordered_map now.

I applied following command to make this CL.

$ git grep -l 'base::hash_map' | fgrep -v base/ | xargs sed -i -e 's/base::hash_map/std::unordered_set/g' -e 's/\(#include <[a-z_]*>\)/\1\n#include <unordered_map>/' -e 's/BASE_HASH_NAMESPACE/std/'
$ git cl format
$ # Added IntPairHash and replaced BASE_HASH_NAMESPACE with std in some places.

TBR: dcheng@chromium.org
Bug: 576864
Change-Id: I38941d9f9bcb05ec474b8dee5230c4c5dcd2211f
Reviewed-on: https://chromium-review.googlesource.com/c/1390892
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#620124}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: adf31eb3e54893f0ca322d6fba941c3ebc9853e9
diff --git a/forwarder2/device_controller.h b/forwarder2/device_controller.h
index 9b3e3a1..953c68a 100644
--- a/forwarder2/device_controller.h
+++ b/forwarder2/device_controller.h
@@ -7,6 +7,7 @@
 
 #include <memory>
 #include <string>
+#include <unordered_map>
 
 #include "base/containers/hash_tables.h"
 #include "base/macros.h"
@@ -52,7 +53,8 @@
   // Lets ensure DeviceListener instances are deleted on the thread they were
   // created on.
   const scoped_refptr<base::SingleThreadTaskRunner> construction_task_runner_;
-  base::hash_map<int /* port */, std::unique_ptr<DeviceListener>> listeners_;
+  std::unordered_map<int /* port */, std::unique_ptr<DeviceListener>>
+      listeners_;
 
   //WeakPtrFactory's documentation says:
   // Member variables should appear before the WeakPtrFactory, to ensure
diff --git a/forwarder2/host_controllers_manager.cc b/forwarder2/host_controllers_manager.cc
index 6362234..2b3428a 100644
--- a/forwarder2/host_controllers_manager.cc
+++ b/forwarder2/host_controllers_manager.cc
@@ -232,7 +232,7 @@
 void HostControllersManager::RemoveAdbPortForDeviceIfNeeded(
     const std::string& adb_path,
     const std::string& device_serial) {
-  base::hash_map<std::string, int>::const_iterator it =
+  std::unordered_map<std::string, int>::const_iterator it =
       device_serial_to_adb_port_map_.find(device_serial);
   if (it == device_serial_to_adb_port_map_.end())
     return;
@@ -278,7 +278,7 @@
 int HostControllersManager::GetAdbPortForDevice(
     const std::string adb_path,
     const std::string& device_serial) {
-  base::hash_map<std::string, int>::const_iterator it =
+  std::unordered_map<std::string, int>::const_iterator it =
       device_serial_to_adb_port_map_.find(device_serial);
   if (it != device_serial_to_adb_port_map_.end())
     return it->second;
diff --git a/forwarder2/host_controllers_manager.h b/forwarder2/host_controllers_manager.h
index fbdb453..4a86cb8 100644
--- a/forwarder2/host_controllers_manager.h
+++ b/forwarder2/host_controllers_manager.h
@@ -7,6 +7,7 @@
 
 #include <memory>
 #include <string>
+#include <unordered_map>
 
 #include "base/at_exit.h"
 #include "base/containers/hash_tables.h"
@@ -44,7 +45,7 @@
   FRIEND_TEST_ALL_PREFIXES(HostControllersManagerTest, AdbArgumentSequence);
 
   using HostControllerMap =
-      base::hash_map<std::string, std::unique_ptr<HostController>>;
+      std::unordered_map<std::string, std::unique_ptr<HostController>>;
 
   static std::string MakeHostControllerMapKey(int adb_port, int device_port);
 
@@ -102,7 +103,7 @@
   virtual bool GetAppOutputAndError(const std::vector<std::string>& argv,
                                     std::string* output);
 
-  base::hash_map<std::string, int> device_serial_to_adb_port_map_;
+  std::unordered_map<std::string, int> device_serial_to_adb_port_map_;
   std::unique_ptr<HostControllerMap> controllers_;
   std::unique_ptr<base::AtExitManager>
       at_exit_manager_;  // Needed by base::Thread.
diff --git a/memdump/memdump.cc b/memdump/memdump.cc
index 572a838..9d27a55 100644
--- a/memdump/memdump.cc
+++ b/memdump/memdump.cc
@@ -15,6 +15,7 @@
 #include <iostream>
 #include <limits>
 #include <string>
+#include <unordered_map>
 #include <utility>
 #include <vector>
 
@@ -123,7 +124,7 @@
 }
 
 // Number of times a physical page is mapped in a process.
-typedef base::hash_map<uint64_t, int> PFNMap;
+typedef std::unordered_map<uint64_t, int> PFNMap;
 
 // Parses lines from /proc/<PID>/maps, e.g.:
 // 401e7000-401f5000 r-xp 00000000 103:02 158       /system/bin/linker