Remove now unused RelocationBehavior

Change-Id: Ifdb98a63376014a698b53bc926fb1c5512dc2e57
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 9a354e1..b6a3819 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -702,9 +702,7 @@
   oat_filename += runtime->GetHostPrefix();
   oat_filename += oat_location->ToModifiedUtf8();
   runtime->GetHeap()->UnReserveOatFileAddressRange();
-  OatFile* oat_file = OatFile::Open(oat_filename, oat_filename,
-                                    image_header.GetOatBegin(),
-                                    OatFile::kRelocNone);
+  OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatBegin());
   VLOG(startup) << "ClassLinker::OpenOat entering oat_filename=" << oat_filename;
   if (oat_file == NULL) {
     LOG(ERROR) << "Failed to open oat file " << oat_filename << " referenced from image.";
@@ -743,8 +741,7 @@
 static const DexFile* FindDexFileInOatLocation(const std::string& dex_location,
                                                uint32_t dex_location_checksum,
                                                const std::string& oat_location) {
-  UniquePtr<OatFile> oat_file(
-      OatFile::Open(oat_location, oat_location, NULL, OatFile::kRelocAll));
+  UniquePtr<OatFile> oat_file(OatFile::Open(oat_location, oat_location, NULL));
   if (oat_file.get() == NULL) {
     return NULL;
   }
@@ -805,8 +802,7 @@
     LOG(ERROR) << "Failed to seek to start of generated oat file: " << oat_location;
     return NULL;
   }
-  const OatFile* oat_file =
-      OatFile::Open(*file.get(), oat_location, NULL, OatFile::kRelocAll);
+  const OatFile* oat_file = OatFile::Open(*file.get(), oat_location, NULL);
   if (oat_file == NULL) {
     LOG(ERROR) << "Failed to open generated oat file: " << oat_location;
     return NULL;
@@ -955,8 +951,7 @@
     return oat_file;
   }
 
-  oat_file = OatFile::Open(oat_location, oat_location, NULL,
-                           OatFile::kRelocAll);
+  oat_file = OatFile::Open(oat_location, oat_location, NULL);
   if (oat_file == NULL) {
     return NULL;
   }
diff --git a/src/image_writer.cc b/src/image_writer.cc
index a9aa2e0..9f46fde 100644
--- a/src/image_writer.cc
+++ b/src/image_writer.cc
@@ -64,8 +64,7 @@
     dex_caches_.insert(dex_cache);
   }
 
-  oat_file_ = OatFile::Open(oat_filename, oat_location, NULL,
-                            OatFile::kRelocNone, true);
+  oat_file_ = OatFile::Open(oat_filename, oat_location, NULL, true);
   if (oat_file_ == NULL) {
     LOG(ERROR) << "Failed to open oat file " << oat_filename;
     return false;
diff --git a/src/native/dalvik_system_DexFile.cc b/src/native/dalvik_system_DexFile.cc
index a55d7f1..fca9bf7 100644
--- a/src/native/dalvik_system_DexFile.cc
+++ b/src/native/dalvik_system_DexFile.cc
@@ -206,8 +206,7 @@
 
   // Check if we have an oat file next to the dex file.
   std::string oat_filename(OatFile::DexFilenameToOatFilename(filename.c_str()));
-  UniquePtr<const OatFile> oat_file(
-      OatFile::Open(oat_filename, oat_filename, NULL, OatFile::kRelocNone));
+  UniquePtr<const OatFile> oat_file(OatFile::Open(oat_filename, oat_filename, NULL));
   if (oat_file.get() != NULL && oat_file->GetOatDexFile(filename.c_str()) != NULL) {
     uint32_t location_checksum;
     // If we have no classes.dex checksum such as in a user build, assume up-to-date.
@@ -229,8 +228,7 @@
 
   // Check if we have an oat file in the cache
   std::string cache_location(GetArtCacheFilenameOrDie(oat_filename));
-  oat_file.reset(
-      OatFile::Open(cache_location, oat_filename, NULL, OatFile::kRelocNone));
+  oat_file.reset(OatFile::Open(cache_location, oat_filename, NULL));
   if (oat_file.get() == NULL) {
     LOG(INFO) << "DexFile_isDexOptNeeded cache file " << cache_location
               << " does not exist for " << filename.c_str();
diff --git a/src/oat_file.cc b/src/oat_file.cc
index 145d2e2..bd21f9a 100644
--- a/src/oat_file.cc
+++ b/src/oat_file.cc
@@ -32,27 +32,25 @@
 OatFile* OatFile::Open(const std::string& filename,
                        const std::string& location,
                        byte* requested_base,
-                       RelocationBehavior reloc,
                        bool writable) {
   CHECK(!filename.empty()) << location;
   UniquePtr<File> file(OS::OpenFile(filename.c_str(), writable, false));
   if (file.get() == NULL) {
     return NULL;
   }
-  return Open(*file.get(), location, requested_base, reloc, writable);
+  return Open(*file.get(), location, requested_base, writable);
 }
 
 OatFile* OatFile::Open(File& file,
                        const std::string& location,
                        byte* requested_base,
-                       RelocationBehavior reloc,
                        bool writable) {
   CHECK(!location.empty());
   if (!IsValidOatFilename(location)) {
     LOG(WARNING) << "Attempting to open oat file with unknown extension '" << location << "'";
   }
   UniquePtr<OatFile> oat_file(new OatFile(location));
-  bool success = oat_file->Map(file, requested_base, reloc, writable);
+  bool success = oat_file->Map(file, requested_base, writable);
   if (!success) {
     return NULL;
   }
@@ -70,7 +68,6 @@
 
 bool OatFile::Map(File& file,
                   byte* requested_base,
-                  RelocationBehavior /*UNUSED*/,
                   bool writable) {
   OatHeader oat_header;
   bool success = file.ReadFully(&oat_header, sizeof(oat_header));
diff --git a/src/oat_file.h b/src/oat_file.h
index 1481ce5..1fa8a05 100644
--- a/src/oat_file.h
+++ b/src/oat_file.h
@@ -29,11 +29,6 @@
 
 class OatFile {
  public:
-  enum RelocationBehavior {
-    kRelocNone,
-    kRelocAll,
-  };
-
   // Returns an OatFile name based on a DexFile location
   static std::string DexFilenameToOatFilename(const std::string& location);
 
@@ -42,14 +37,12 @@
   static OatFile* Open(const std::string& filename,
                        const std::string& location,
                        byte* requested_base,
-                       RelocationBehavior reloc,
                        bool writable = false);
 
   // Open an oat file from an already opened File with the given location.
   static OatFile* Open(File& file,
                        const std::string& location,
                        byte* requested_base,
-                       RelocationBehavior reloc,
                        bool writable = false);
 
   ~OatFile();
@@ -227,7 +220,7 @@
 
  private:
   explicit OatFile(const std::string& filename);
-  bool Map(File& file, byte* requested_base, RelocationBehavior reloc, bool writable);
+  bool Map(File& file, byte* requested_base, bool writable);
 
   const byte* Begin() const;
   const byte* End() const;
diff --git a/src/oat_test.cc b/src/oat_test.cc
index 52217b2..ae30c7e 100644
--- a/src/oat_test.cc
+++ b/src/oat_test.cc
@@ -92,8 +92,7 @@
   }
   UniquePtr<OatFile> oat_file(OatFile::Open(tmp.GetFilename(),
                                             tmp.GetFilename(),
-                                            NULL,
-                                            OatFile::kRelocNone));
+                                            NULL));
   ASSERT_TRUE(oat_file.get() != NULL);
   const OatHeader& oat_header = oat_file->GetOatHeader();
   ASSERT_TRUE(oat_header.IsValid());
diff --git a/src/oatdump.cc b/src/oatdump.cc
index 45d936a..2dab5bd 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -1422,7 +1422,7 @@
 
   if (oat_filename != NULL) {
     OatFile* oat_file =
-        OatFile::Open(oat_filename, oat_filename, NULL, OatFile::kRelocNone);
+        OatFile::Open(oat_filename, oat_filename, NULL);
     if (oat_file == NULL) {
       fprintf(stderr, "Failed to open oat file from %s\n", oat_filename);
       return EXIT_FAILURE;