Switch to UniquePtr.

Only one use of scoped_ptr was incorrect (but then again, I spent an afternoon
with valgrind finding and fixing them just last week).

Change-Id: If5ec1c8aa0794a4f652bfd1c0fffccf95facdc40
diff --git a/src/runtime.cc b/src/runtime.cc
index e628f2c..50f25fe 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7,14 +7,16 @@
 #include <limits>
 #include <vector>
 
-#include "JniConstants.h"
+#include "UniquePtr.h"
 #include "class_linker.h"
 #include "heap.h"
 #include "jni_internal.h"
-#include "scoped_ptr.h"
 #include "signal_catcher.h"
 #include "thread.h"
 
+// TODO: this drags in cutil/log.h, which conflicts with our logging.h.
+#include "JniConstants.h"
+
 namespace art {
 
 Runtime* Runtime::instance_ = NULL;
@@ -164,7 +166,7 @@
 }
 
 Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, bool ignore_unrecognized) {
-  scoped_ptr<ParsedOptions> parsed(new ParsedOptions());
+  UniquePtr<ParsedOptions> parsed(new ParsedOptions());
   const char* boot_class_path = getenv("BOOTCLASSPATH");
   parsed->boot_image_ = NULL;
 #ifdef NDEBUG
@@ -279,7 +281,7 @@
   if (Runtime::instance_ != NULL) {
     return NULL;
   }
-  scoped_ptr<Runtime> runtime(new Runtime());
+  UniquePtr<Runtime> runtime(new Runtime());
   bool success = runtime->Init(options, ignore_unrecognized);
   if (!success) {
     return NULL;
@@ -303,8 +305,8 @@
 bool Runtime::Init(const Options& raw_options, bool ignore_unrecognized) {
   CHECK_EQ(sysconf(_SC_PAGE_SIZE), kPageSize);
 
-  scoped_ptr<ParsedOptions> options(ParsedOptions::Create(raw_options, ignore_unrecognized));
-  if (options == NULL) {
+  UniquePtr<ParsedOptions> options(ParsedOptions::Create(raw_options, ignore_unrecognized));
+  if (options.get() == NULL) {
     return false;
   }
   vfprintf_ = options->hook_vfprintf_;