Make //mojo/edk/system use //mojo/util's WeakPtr(Factory) instead of base's.

R=vardhan@google.com

Review URL: https://codereview.chromium.org/1641393002 .
diff --git a/mojo/edk/system/channel_manager.cc b/mojo/edk/system/channel_manager.cc
index 60ba4d3..a08d2c7 100644
--- a/mojo/edk/system/channel_manager.cc
+++ b/mojo/edk/system/channel_manager.cc
@@ -6,6 +6,7 @@
 
 #include <utility>
 
+#include "base/logging.h"
 #include "mojo/edk/platform/platform_handle.h"
 #include "mojo/edk/system/channel.h"
 #include "mojo/edk/system/channel_endpoint.h"
diff --git a/mojo/edk/system/raw_channel.h b/mojo/edk/system/raw_channel.h
index 86a290b..8398a4b 100644
--- a/mojo/edk/system/raw_channel.h
+++ b/mojo/edk/system/raw_channel.h
@@ -8,7 +8,6 @@
 #include <memory>
 #include <vector>
 
-#include "base/memory/weak_ptr.h"
 #include "mojo/edk/platform/platform_handle.h"
 #include "mojo/edk/platform/platform_handle_watcher.h"
 #include "mojo/edk/platform/scoped_platform_handle.h"
@@ -18,6 +17,7 @@
 #include "mojo/edk/util/mutex.h"
 #include "mojo/edk/util/ref_ptr.h"
 #include "mojo/edk/util/thread_annotations.h"
+#include "mojo/edk/util/weak_ptr.h"
 #include "mojo/public/cpp/system/macros.h"
 
 namespace mojo {
@@ -334,7 +334,7 @@
 
   // This is used for posting tasks from write threads to the I/O thread. The
   // weak pointers it produces are only used/invalidated on the I/O thread.
-  base::WeakPtrFactory<RawChannel> weak_ptr_factory_
+  util::WeakPtrFactory<RawChannel> weak_ptr_factory_
       MOJO_GUARDED_BY(write_mutex_);
 
   MOJO_DISALLOW_COPY_AND_ASSIGN(RawChannel);
diff --git a/mojo/edk/system/raw_channel_posix.cc b/mojo/edk/system/raw_channel_posix.cc
index 3eaed5c..01f16f2 100644
--- a/mojo/edk/system/raw_channel_posix.cc
+++ b/mojo/edk/system/raw_channel_posix.cc
@@ -16,13 +16,13 @@
 #include <vector>
 
 #include "base/logging.h"
-#include "base/memory/weak_ptr.h"
 #include "mojo/edk/embedder/platform_channel_utils.h"
 #include "mojo/edk/platform/platform_handle.h"
 #include "mojo/edk/platform/platform_handle_watcher.h"
 #include "mojo/edk/platform/scoped_platform_handle.h"
 #include "mojo/edk/system/transport_data.h"
 #include "mojo/edk/util/make_unique.h"
+#include "mojo/edk/util/weak_ptr.h"
 #include "mojo/public/cpp/system/macros.h"
 
 using mojo::platform::PlatformHandle;
@@ -30,6 +30,7 @@
 using mojo::platform::ScopedPlatformHandle;
 using mojo::util::MakeUnique;
 using mojo::util::MutexLocker;
+using mojo::util::WeakPtrFactory;
 
 namespace mojo {
 namespace system {
@@ -89,7 +90,7 @@
 
   // This is used for posting tasks from write threads to the I/O thread. The
   // weak pointers it produces are only used/invalidated on the I/O thread.
-  base::WeakPtrFactory<RawChannelPosix> weak_ptr_factory_
+  WeakPtrFactory<RawChannelPosix> weak_ptr_factory_
       MOJO_GUARDED_BY(write_mutex());
 
   MOJO_DISALLOW_COPY_AND_ASSIGN(RawChannelPosix);