Replace std::tr1::shared_ptr by std::shared_ptr.

This patch replaces C++ Technical Report 1 additions to C++03 with
the newer C++11 name.

Includes and using statements updated accordingly.

BUG=None
TEST=Build and unittests.

Change-Id: I9bdad6d39684545c786f5c76fb598a15b557d6eb
Reviewed-on: https://chromium-review.googlesource.com/200665
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/action.h b/action.h
index 7ac4a13..27a2297 100644
--- a/action.h
+++ b/action.h
@@ -6,12 +6,15 @@
 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_H_
 
 #include <stdio.h>
-#include <tr1/memory>
+
 #include <iostream>
-#include "base/basictypes.h"
-#include "base/logging.h"
-#include "update_engine/action_processor.h"
+#include <memory>
+
+#include <base/basictypes.h>
+#include <base/logging.h>
+
 #include "update_engine/action_pipe.h"
+#include "update_engine/action_processor.h"
 
 // The structure of these classes (Action, ActionPipe, ActionProcessor, etc.)
 // is based on the KSAction* classes from the Google Update Engine code at
@@ -137,7 +140,7 @@
   void set_in_pipe(
       // this type is a fancy way of saying: a shared_ptr to an
       // ActionPipe<InputObjectType>.
-      const std::tr1::shared_ptr<ActionPipe<
+      const std::shared_ptr<ActionPipe<
           typename ActionTraits<SubClass>::InputObjectType> >&
           in_pipe) {
     in_pipe_ = in_pipe;
@@ -150,7 +153,7 @@
   void set_out_pipe(
       // this type is a fancy way of saying: a shared_ptr to an
       // ActionPipe<OutputObjectType>.
-      const std::tr1::shared_ptr<ActionPipe<
+      const std::shared_ptr<ActionPipe<
           typename ActionTraits<SubClass>::OutputObjectType> >&
           out_pipe) {
     out_pipe_ = out_pipe;
@@ -193,10 +196,10 @@
   // point to when the last such shared_ptr object dies. We consider the
   // Actions on either end of a pipe to "own" the pipe. When the last Action
   // of the two dies, the ActionPipe will die, too.
-  std::tr1::shared_ptr<
+  std::shared_ptr<
       ActionPipe<typename ActionTraits<SubClass>::InputObjectType> >
       in_pipe_;
-  std::tr1::shared_ptr<
+  std::shared_ptr<
       ActionPipe<typename ActionTraits<SubClass>::OutputObjectType> >
       out_pipe_;
 };
diff --git a/action_pipe.h b/action_pipe.h
index 8e4f761..99f98cf 100644
--- a/action_pipe.h
+++ b/action_pipe.h
@@ -6,12 +6,14 @@
 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_ACTION_PIPE_H_
 
 #include <stdio.h>
+
 #include <iostream>
 #include <map>
+#include <memory>
 #include <string>
-#include <tr1/memory>
-#include "base/basictypes.h"
-#include "base/logging.h"
+
+#include <base/basictypes.h>
+#include <base/logging.h>
 
 // The structure of these classes (Action, ActionPipe, ActionProcessor, etc.)
 // is based on the KSAction* classes from the Google Update Engine code at
@@ -56,7 +58,7 @@
   // when the last Action is destroyed.
   template<typename FromAction, typename ToAction>
   static void Bond(FromAction* from, ToAction* to) {
-    std::tr1::shared_ptr<ActionPipe<ObjectType> > pipe(
+    std::shared_ptr<ActionPipe<ObjectType> > pipe(
         new ActionPipe<ObjectType>);
     from->set_out_pipe(pipe);
 
diff --git a/payload_generator/full_update_generator.cc b/payload_generator/full_update_generator.cc
index 3a17594..fb18856 100644
--- a/payload_generator/full_update_generator.cc
+++ b/payload_generator/full_update_generator.cc
@@ -7,7 +7,7 @@
 #include <fcntl.h>
 #include <inttypes.h>
 
-#include <tr1/memory>
+#include <memory>
 
 #include <base/strings/string_util.h>
 #include <base/strings/stringprintf.h>
@@ -18,8 +18,8 @@
 using std::deque;
 using std::max;
 using std::min;
+using std::shared_ptr;
 using std::string;
-using std::tr1::shared_ptr;
 using std::vector;
 
 namespace chromeos_update_engine {
diff --git a/subprocess.cc b/subprocess.cc
index 7021cc5..5274655 100644
--- a/subprocess.cc
+++ b/subprocess.cc
@@ -18,8 +18,8 @@
 
 #include "update_engine/utils.h"
 
+using std::shared_ptr;
 using std::string;
-using std::tr1::shared_ptr;
 using std::vector;
 
 namespace chromeos_update_engine {
diff --git a/subprocess.h b/subprocess.h
index 9e64806..3a8424c 100644
--- a/subprocess.h
+++ b/subprocess.h
@@ -6,8 +6,8 @@
 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_SUBPROCESS_H_
 
 #include <map>
+#include <memory>
 #include <string>
-#include <tr1/memory>
 #include <vector>
 
 #include <glib.h>
@@ -97,7 +97,7 @@
 
   // A map from the asynchronous subprocess tag (see Exec) to the subprocess
   // record structure for all active asynchronous subprocesses.
-  std::map<int, std::tr1::shared_ptr<SubprocessRecord> > subprocess_records_;
+  std::map<int, std::shared_ptr<SubprocessRecord> > subprocess_records_;
 
   DISALLOW_COPY_AND_ASSIGN(Subprocess);
 };
diff --git a/update_attempter.cc b/update_attempter.cc
index fc65fb3..dd52d0d 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -4,10 +4,10 @@
 
 #include "update_engine/update_attempter.h"
 
-#include <string>
-#include <tr1/memory>
-#include <vector>
 #include <algorithm>
+#include <memory>
+#include <string>
+#include <vector>
 
 #include <base/file_util.h>
 #include <base/logging.h>
@@ -17,8 +17,8 @@
 
 #include <glib.h>
 #include <metrics/metrics_library.h>
-#include <policy/libpolicy.h>
 #include <policy/device_policy.h>
+#include <policy/libpolicy.h>
 
 #include "update_engine/certificate_checker.h"
 #include "update_engine/clock_interface.h"
@@ -42,14 +42,14 @@
 #include "update_engine/update_check_scheduler.h"
 #include "update_engine/utils.h"
 
+using base::StringPrintf;
 using base::Time;
 using base::TimeDelta;
 using base::TimeTicks;
-using base::StringPrintf;
 using google::protobuf::NewPermanentCallback;
 using std::make_pair;
-using std::tr1::shared_ptr;
 using std::set;
+using std::shared_ptr;
 using std::string;
 using std::vector;
 
diff --git a/update_attempter.h b/update_attempter.h
index 9c460ad..82cba8c 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -7,7 +7,7 @@
 
 #include <time.h>
 
-#include <tr1/memory>
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -354,7 +354,7 @@
   // set back in the middle of an update.
   base::TimeTicks last_notify_time_;
 
-  std::vector<std::tr1::shared_ptr<AbstractAction> > actions_;
+  std::vector<std::shared_ptr<AbstractAction> > actions_;
   scoped_ptr<ActionProcessor> processor_;
 
   // External state of the system outside the update_engine process
@@ -366,10 +366,10 @@
   UpdateEngineService* dbus_service_ = nullptr;
 
   // Pointer to the OmahaResponseHandlerAction in the actions_ vector.
-  std::tr1::shared_ptr<OmahaResponseHandlerAction> response_handler_action_;
+  std::shared_ptr<OmahaResponseHandlerAction> response_handler_action_;
 
   // Pointer to the DownloadAction in the actions_ vector.
-  std::tr1::shared_ptr<DownloadAction> download_action_;
+  std::shared_ptr<DownloadAction> download_action_;
 
   // Pointer to the preferences store interface. This is just a cached
   // copy of system_state->prefs() because it's used in many methods and