update_engine: use ScopedTempDir::GetPath

Upstream versions of libchrome have gotten rid of ScopedTempDir's
inline path method because they wanted to introduce a DCHECK that
helps make sure people create the temp directory before using it.
To avoid introducing a header dependency on the logging header
they took this method out of the header so it wouldn't be inlined.

BUG=b:37434548
TEST=unit tests

Change-Id: If1dcc5e43f54ab32fd43da7b939216a4834548d5
Reviewed-on: https://chromium-review.googlesource.com/882543
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/common/hwid_override_unittest.cc b/common/hwid_override_unittest.cc
index 26ef30a..35e6438 100644
--- a/common/hwid_override_unittest.cc
+++ b/common/hwid_override_unittest.cc
@@ -32,7 +32,7 @@
 
   void SetUp() override {
     ASSERT_TRUE(tempdir_.CreateUniqueTempDir());
-    ASSERT_TRUE(base::CreateDirectory(tempdir_.path().Append("etc")));
+    ASSERT_TRUE(base::CreateDirectory(tempdir_.GetPath().Append("etc")));
   }
 
  protected:
@@ -46,22 +46,24 @@
   std::string expected_hwid("expected");
   std::string keyval(HwidOverride::kHwidOverrideKey);
   keyval += ("=" + expected_hwid);
-  ASSERT_EQ(base::WriteFile(tempdir_.path().Append("etc/lsb-release"),
-                            keyval.c_str(), keyval.length()),
+  ASSERT_EQ(base::WriteFile(tempdir_.GetPath().Append("etc/lsb-release"),
+                            keyval.c_str(),
+                            keyval.length()),
             static_cast<int>(keyval.length()));
-  EXPECT_EQ(expected_hwid, HwidOverride::Read(tempdir_.path()));
+  EXPECT_EQ(expected_hwid, HwidOverride::Read(tempdir_.GetPath()));
 }
 
 TEST_F(HwidOverrideTest, ReadNothing) {
   std::string keyval("SOMETHING_ELSE=UNINTERESTING");
-  ASSERT_EQ(base::WriteFile(tempdir_.path().Append("etc/lsb-release"),
-                            keyval.c_str(), keyval.length()),
+  ASSERT_EQ(base::WriteFile(tempdir_.GetPath().Append("etc/lsb-release"),
+                            keyval.c_str(),
+                            keyval.length()),
             static_cast<int>(keyval.length()));
-  EXPECT_EQ(std::string(), HwidOverride::Read(tempdir_.path()));
+  EXPECT_EQ(std::string(), HwidOverride::Read(tempdir_.GetPath()));
 }
 
 TEST_F(HwidOverrideTest, ReadFailure) {
-  EXPECT_EQ(std::string(), HwidOverride::Read(tempdir_.path()));
+  EXPECT_EQ(std::string(), HwidOverride::Read(tempdir_.GetPath()));
 }
 
 }  // namespace chromeos_update_engine
diff --git a/common/prefs_unittest.cc b/common/prefs_unittest.cc
index 73ceb00..aa2eb04 100644
--- a/common/prefs_unittest.cc
+++ b/common/prefs_unittest.cc
@@ -44,7 +44,7 @@
  protected:
   void SetUp() override {
     ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
-    prefs_dir_ = temp_dir_.path();
+    prefs_dir_ = temp_dir_.GetPath();
     ASSERT_TRUE(prefs_.Init(prefs_dir_));
   }
 
diff --git a/common/subprocess_unittest.cc b/common/subprocess_unittest.cc
index cbc9a85..10710e8 100644
--- a/common/subprocess_unittest.cc
+++ b/common/subprocess_unittest.cc
@@ -225,7 +225,7 @@
 TEST_F(SubprocessTest, CancelTest) {
   base::ScopedTempDir tempdir;
   ASSERT_TRUE(tempdir.CreateUniqueTempDir());
-  string fifo_path = tempdir.path().Append("fifo").value();
+  string fifo_path = tempdir.GetPath().Append("fifo").value();
   EXPECT_EQ(0, mkfifo(fifo_path.c_str(), 0666));
 
   // Start a process, make sure it is running and try to cancel it. We write
diff --git a/common/test_utils.cc b/common/test_utils.cc
index fb22c80..3447cdc 100644
--- a/common/test_utils.cc
+++ b/common/test_utils.cc
@@ -248,7 +248,7 @@
                                      string* mnt_path,
                                      unsigned long flags) {  // NOLINT - long
   EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
-  *mnt_path = temp_dir_.path().value();
+  *mnt_path = temp_dir_.GetPath().value();
 
   string loop_dev;
   loop_binder_.reset(
diff --git a/common/utils_unittest.cc b/common/utils_unittest.cc
index 6e9a911..033702b 100644
--- a/common/utils_unittest.cc
+++ b/common/utils_unittest.cc
@@ -100,11 +100,11 @@
 TEST(UtilsTest, IsSymlinkTest) {
   base::ScopedTempDir temp_dir;
   ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
-  string temp_file = temp_dir.path().Append("temp-file").value();
+  string temp_file = temp_dir.GetPath().Append("temp-file").value();
   EXPECT_TRUE(utils::WriteFile(temp_file.c_str(), "", 0));
-  string temp_symlink = temp_dir.path().Append("temp-symlink").value();
+  string temp_symlink = temp_dir.GetPath().Append("temp-symlink").value();
   EXPECT_EQ(0, symlink(temp_file.c_str(), temp_symlink.c_str()));
-  EXPECT_FALSE(utils::IsSymlink(temp_dir.path().value().c_str()));
+  EXPECT_FALSE(utils::IsSymlink(temp_dir.GetPath().value().c_str()));
   EXPECT_FALSE(utils::IsSymlink(temp_file.c_str()));
   EXPECT_TRUE(utils::IsSymlink(temp_symlink.c_str()));
   EXPECT_FALSE(utils::IsSymlink("/non/existent/path"));
@@ -478,23 +478,23 @@
   test_utils::ScopedLoopbackDeviceBinder loop_binder(
       tmp_image, true, &loop_dev);
 
-  EXPECT_FALSE(utils::IsMountpoint(mnt_dir.path().value()));
+  EXPECT_FALSE(utils::IsMountpoint(mnt_dir.GetPath().value()));
   // This is the actual test part. While we hold a file descriptor open for the
   // mounted filesystem, umount should still succeed.
   EXPECT_TRUE(utils::MountFilesystem(
-      loop_dev, mnt_dir.path().value(), MS_RDONLY, "ext4", ""));
+      loop_dev, mnt_dir.GetPath().value(), MS_RDONLY, "ext4", ""));
   // Verify the directory is a mount point now.
-  EXPECT_TRUE(utils::IsMountpoint(mnt_dir.path().value()));
+  EXPECT_TRUE(utils::IsMountpoint(mnt_dir.GetPath().value()));
 
-  string target_file = mnt_dir.path().Append("empty-file").value();
+  string target_file = mnt_dir.GetPath().Append("empty-file").value();
   int fd = HANDLE_EINTR(open(target_file.c_str(), O_RDONLY));
   EXPECT_GE(fd, 0);
-  EXPECT_TRUE(utils::UnmountFilesystem(mnt_dir.path().value()));
+  EXPECT_TRUE(utils::UnmountFilesystem(mnt_dir.GetPath().value()));
   // The filesystem should be already unmounted at this point.
-  EXPECT_FALSE(utils::IsMountpoint(mnt_dir.path().value()));
+  EXPECT_FALSE(utils::IsMountpoint(mnt_dir.GetPath().value()));
   IGNORE_EINTR(close(fd));
   // The filesystem was already unmounted so this call should fail.
-  EXPECT_FALSE(utils::UnmountFilesystem(mnt_dir.path().value()));
+  EXPECT_FALSE(utils::UnmountFilesystem(mnt_dir.GetPath().value()));
 }
 
 TEST(UtilsTest, IsMountpointTest) {
@@ -503,7 +503,7 @@
 
   base::ScopedTempDir mnt_dir;
   EXPECT_TRUE(mnt_dir.CreateUniqueTempDir());
-  EXPECT_FALSE(utils::IsMountpoint(mnt_dir.path().value()));
+  EXPECT_FALSE(utils::IsMountpoint(mnt_dir.GetPath().value()));
 
   base::FilePath file;
   EXPECT_TRUE(base::CreateTemporaryFile(&file));
diff --git a/hardware_chromeos_unittest.cc b/hardware_chromeos_unittest.cc
index a6bad54..162dec4 100644
--- a/hardware_chromeos_unittest.cc
+++ b/hardware_chromeos_unittest.cc
@@ -37,21 +37,22 @@
   void SetUp() override { ASSERT_TRUE(root_dir_.CreateUniqueTempDir()); }
 
   void WriteStatefulConfig(const string& config) {
-    base::FilePath kFile(root_dir_.path().value() + kStatefulPartition +
+    base::FilePath kFile(root_dir_.GetPath().value() + kStatefulPartition +
                          "/etc/update_manager.conf");
     ASSERT_TRUE(base::CreateDirectory(kFile.DirName()));
     ASSERT_TRUE(WriteFileString(kFile.value(), config));
   }
 
   void WriteRootfsConfig(const string& config) {
-    base::FilePath kFile(root_dir_.path().value() + "/etc/update_manager.conf");
+    base::FilePath kFile(root_dir_.GetPath().value() +
+                         "/etc/update_manager.conf");
     ASSERT_TRUE(base::CreateDirectory(kFile.DirName()));
     ASSERT_TRUE(WriteFileString(kFile.value(), config));
   }
 
   // Helper method to call HardwareChromeOS::LoadConfig with the test directory.
   void CallLoadConfig(bool normal_mode) {
-    hardware_.LoadConfig(root_dir_.path().value(), normal_mode);
+    hardware_.LoadConfig(root_dir_.GetPath().value(), normal_mode);
   }
 
   HardwareChromeOS hardware_;
diff --git a/image_properties_chromeos_unittest.cc b/image_properties_chromeos_unittest.cc
index 12c2039..d9ed688 100644
--- a/image_properties_chromeos_unittest.cc
+++ b/image_properties_chromeos_unittest.cc
@@ -36,10 +36,10 @@
   void SetUp() override {
     // Create a uniquely named test directory.
     ASSERT_TRUE(tempdir_.CreateUniqueTempDir());
-    EXPECT_TRUE(base::CreateDirectory(tempdir_.path().Append("etc")));
-    EXPECT_TRUE(base::CreateDirectory(
-        base::FilePath(tempdir_.path().value() + kStatefulPartition + "/etc")));
-    test::SetImagePropertiesRootPrefix(tempdir_.path().value().c_str());
+    EXPECT_TRUE(base::CreateDirectory(tempdir_.GetPath().Append("etc")));
+    EXPECT_TRUE(base::CreateDirectory(base::FilePath(
+        tempdir_.GetPath().value() + kStatefulPartition + "/etc")));
+    test::SetImagePropertiesRootPrefix(tempdir_.GetPath().value().c_str());
     SetLockDown(false);
   }
 
@@ -54,12 +54,13 @@
 };
 
 TEST_F(ImagePropertiesTest, SimpleTest) {
-  ASSERT_TRUE(WriteFileString(tempdir_.path().Append("etc/lsb-release").value(),
-                              "CHROMEOS_RELEASE_BOARD=arm-generic\n"
-                              "CHROMEOS_RELEASE_FOO=bar\n"
-                              "CHROMEOS_RELEASE_VERSION=0.2.2.3\n"
-                              "CHROMEOS_RELEASE_TRACK=dev-channel\n"
-                              "CHROMEOS_AUSERVER=http://www.google.com"));
+  ASSERT_TRUE(
+      WriteFileString(tempdir_.GetPath().Append("etc/lsb-release").value(),
+                      "CHROMEOS_RELEASE_BOARD=arm-generic\n"
+                      "CHROMEOS_RELEASE_FOO=bar\n"
+                      "CHROMEOS_RELEASE_VERSION=0.2.2.3\n"
+                      "CHROMEOS_RELEASE_TRACK=dev-channel\n"
+                      "CHROMEOS_AUSERVER=http://www.google.com"));
   ImageProperties props = LoadImageProperties(&fake_system_state_);
   EXPECT_EQ("arm-generic", props.board);
   EXPECT_EQ("{87efface-864d-49a5-9bb3-4b050a7c227a}", props.product_id);
@@ -70,7 +71,7 @@
 
 TEST_F(ImagePropertiesTest, AppIDTest) {
   ASSERT_TRUE(WriteFileString(
-      tempdir_.path().Append("etc/lsb-release").value(),
+      tempdir_.GetPath().Append("etc/lsb-release").value(),
       "CHROMEOS_RELEASE_APPID={58c35cef-9d30-476e-9098-ce20377d535d}"));
   ImageProperties props = LoadImageProperties(&fake_system_state_);
   EXPECT_EQ("{58c35cef-9d30-476e-9098-ce20377d535d}", props.product_id);
@@ -78,7 +79,7 @@
 
 TEST_F(ImagePropertiesTest, ConfusingReleaseTest) {
   ASSERT_TRUE(
-      WriteFileString(tempdir_.path().Append("etc/lsb-release").value(),
+      WriteFileString(tempdir_.GetPath().Append("etc/lsb-release").value(),
                       "CHROMEOS_RELEASE_FOO=CHROMEOS_RELEASE_VERSION=1.2.3.4\n"
                       "CHROMEOS_RELEASE_VERSION=0.2.2.3"));
   ImageProperties props = LoadImageProperties(&fake_system_state_);
@@ -91,13 +92,14 @@
 }
 
 TEST_F(ImagePropertiesTest, OverrideTest) {
-  ASSERT_TRUE(WriteFileString(tempdir_.path().Append("etc/lsb-release").value(),
-                              "CHROMEOS_RELEASE_BOARD=arm-generic\n"
-                              "CHROMEOS_RELEASE_FOO=bar\n"
-                              "CHROMEOS_RELEASE_TRACK=dev-channel\n"
-                              "CHROMEOS_AUSERVER=http://www.google.com"));
+  ASSERT_TRUE(
+      WriteFileString(tempdir_.GetPath().Append("etc/lsb-release").value(),
+                      "CHROMEOS_RELEASE_BOARD=arm-generic\n"
+                      "CHROMEOS_RELEASE_FOO=bar\n"
+                      "CHROMEOS_RELEASE_TRACK=dev-channel\n"
+                      "CHROMEOS_AUSERVER=http://www.google.com"));
   ASSERT_TRUE(WriteFileString(
-      tempdir_.path().value() + kStatefulPartition + "/etc/lsb-release",
+      tempdir_.GetPath().value() + kStatefulPartition + "/etc/lsb-release",
       "CHROMEOS_RELEASE_BOARD=x86-generic\n"
       "CHROMEOS_RELEASE_TRACK=beta-channel\n"
       "CHROMEOS_AUSERVER=https://www.google.com"));
@@ -111,13 +113,14 @@
 }
 
 TEST_F(ImagePropertiesTest, OverrideLockDownTest) {
-  ASSERT_TRUE(WriteFileString(tempdir_.path().Append("etc/lsb-release").value(),
-                              "CHROMEOS_RELEASE_BOARD=arm-generic\n"
-                              "CHROMEOS_RELEASE_FOO=bar\n"
-                              "CHROMEOS_RELEASE_TRACK=dev-channel\n"
-                              "CHROMEOS_AUSERVER=https://www.google.com"));
+  ASSERT_TRUE(
+      WriteFileString(tempdir_.GetPath().Append("etc/lsb-release").value(),
+                      "CHROMEOS_RELEASE_BOARD=arm-generic\n"
+                      "CHROMEOS_RELEASE_FOO=bar\n"
+                      "CHROMEOS_RELEASE_TRACK=dev-channel\n"
+                      "CHROMEOS_AUSERVER=https://www.google.com"));
   ASSERT_TRUE(WriteFileString(
-      tempdir_.path().value() + kStatefulPartition + "/etc/lsb-release",
+      tempdir_.GetPath().value() + kStatefulPartition + "/etc/lsb-release",
       "CHROMEOS_RELEASE_BOARD=x86-generic\n"
       "CHROMEOS_RELEASE_TRACK=stable-channel\n"
       "CHROMEOS_AUSERVER=http://www.google.com"));
@@ -132,32 +135,35 @@
 }
 
 TEST_F(ImagePropertiesTest, BoardAppIdUsedForNonCanaryChannelTest) {
-  ASSERT_TRUE(WriteFileString(tempdir_.path().Append("etc/lsb-release").value(),
-                              "CHROMEOS_RELEASE_APPID=r\n"
-                              "CHROMEOS_BOARD_APPID=b\n"
-                              "CHROMEOS_CANARY_APPID=c\n"
-                              "CHROMEOS_RELEASE_TRACK=stable-channel\n"));
+  ASSERT_TRUE(
+      WriteFileString(tempdir_.GetPath().Append("etc/lsb-release").value(),
+                      "CHROMEOS_RELEASE_APPID=r\n"
+                      "CHROMEOS_BOARD_APPID=b\n"
+                      "CHROMEOS_CANARY_APPID=c\n"
+                      "CHROMEOS_RELEASE_TRACK=stable-channel\n"));
   ImageProperties props = LoadImageProperties(&fake_system_state_);
   EXPECT_EQ("stable-channel", props.current_channel);
   EXPECT_EQ("b", props.product_id);
 }
 
 TEST_F(ImagePropertiesTest, CanaryAppIdUsedForCanaryChannelTest) {
-  ASSERT_TRUE(WriteFileString(tempdir_.path().Append("etc/lsb-release").value(),
-                              "CHROMEOS_RELEASE_APPID=r\n"
-                              "CHROMEOS_BOARD_APPID=b\n"
-                              "CHROMEOS_CANARY_APPID=c\n"
-                              "CHROMEOS_RELEASE_TRACK=canary-channel\n"));
+  ASSERT_TRUE(
+      WriteFileString(tempdir_.GetPath().Append("etc/lsb-release").value(),
+                      "CHROMEOS_RELEASE_APPID=r\n"
+                      "CHROMEOS_BOARD_APPID=b\n"
+                      "CHROMEOS_CANARY_APPID=c\n"
+                      "CHROMEOS_RELEASE_TRACK=canary-channel\n"));
   ImageProperties props = LoadImageProperties(&fake_system_state_);
   EXPECT_EQ("canary-channel", props.current_channel);
   EXPECT_EQ("c", props.canary_product_id);
 }
 
 TEST_F(ImagePropertiesTest, ReleaseAppIdUsedAsDefaultTest) {
-  ASSERT_TRUE(WriteFileString(tempdir_.path().Append("etc/lsb-release").value(),
-                              "CHROMEOS_RELEASE_APPID=r\n"
-                              "CHROMEOS_CANARY_APPID=c\n"
-                              "CHROMEOS_RELEASE_TRACK=stable-channel\n"));
+  ASSERT_TRUE(
+      WriteFileString(tempdir_.GetPath().Append("etc/lsb-release").value(),
+                      "CHROMEOS_RELEASE_APPID=r\n"
+                      "CHROMEOS_CANARY_APPID=c\n"
+                      "CHROMEOS_RELEASE_TRACK=stable-channel\n"));
   ImageProperties props = LoadImageProperties(&fake_system_state_);
   EXPECT_EQ("stable-channel", props.current_channel);
   EXPECT_EQ("r", props.product_id);
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index c310e72..5698556 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -2061,7 +2061,7 @@
 
   brillo::Blob post_data;
   OmahaRequestParams params(&fake_system_state_);
-  params.set_root(tempdir.path().value());
+  params.set_root(tempdir.GetPath().value());
   params.set_app_id("{22222222-2222-2222-2222-222222222222}");
   params.set_app_version("1.2.3.4");
   params.set_current_channel("canary-channel");
@@ -2094,7 +2094,7 @@
 
   brillo::Blob post_data;
   OmahaRequestParams params(&fake_system_state_);
-  params.set_root(tempdir.path().value());
+  params.set_root(tempdir.GetPath().value());
   params.set_app_id("{11111111-1111-1111-1111-111111111111}");
   params.set_app_version("5.6.7.8");
   params.set_current_channel("stable-channel");
diff --git a/omaha_request_params_unittest.cc b/omaha_request_params_unittest.cc
index 7d4dc2d..57ecf24 100644
--- a/omaha_request_params_unittest.cc
+++ b/omaha_request_params_unittest.cc
@@ -47,7 +47,7 @@
     // Create a fresh copy of the params for each test, so there's no
     // unintended reuse of state across tests.
     params_ = OmahaRequestParams(&fake_system_state_);
-    params_.set_root(tempdir_.path().value());
+    params_.set_root(tempdir_.GetPath().value());
     SetLockDown(false);
     fake_system_state_.set_prefs(&fake_prefs_);
   }
@@ -105,7 +105,8 @@
 }
 
 TEST_F(OmahaRequestParamsTest, NoDeltasTest) {
-  ASSERT_TRUE(WriteFileString(tempdir_.path().Append(".nodelta").value(), ""));
+  ASSERT_TRUE(
+      WriteFileString(tempdir_.GetPath().Append(".nodelta").value(), ""));
   EXPECT_TRUE(params_.Init("", "", false));
   EXPECT_FALSE(params_.delta_okay());
 }
@@ -113,12 +114,12 @@
 TEST_F(OmahaRequestParamsTest, SetTargetChannelTest) {
   {
     OmahaRequestParams params(&fake_system_state_);
-    params.set_root(tempdir_.path().value());
+    params.set_root(tempdir_.GetPath().value());
     EXPECT_TRUE(params.Init("", "", false));
     EXPECT_TRUE(params.SetTargetChannel("canary-channel", false, nullptr));
     EXPECT_FALSE(params.is_powerwash_allowed());
   }
-  params_.set_root(tempdir_.path().value());
+  params_.set_root(tempdir_.GetPath().value());
   EXPECT_TRUE(params_.Init("", "", false));
   EXPECT_EQ("canary-channel", params_.target_channel());
   EXPECT_FALSE(params_.is_powerwash_allowed());
@@ -127,12 +128,12 @@
 TEST_F(OmahaRequestParamsTest, SetIsPowerwashAllowedTest) {
   {
     OmahaRequestParams params(&fake_system_state_);
-    params.set_root(tempdir_.path().value());
+    params.set_root(tempdir_.GetPath().value());
     EXPECT_TRUE(params.Init("", "", false));
     EXPECT_TRUE(params.SetTargetChannel("canary-channel", true, nullptr));
     EXPECT_TRUE(params.is_powerwash_allowed());
   }
-  params_.set_root(tempdir_.path().value());
+  params_.set_root(tempdir_.GetPath().value());
   EXPECT_TRUE(params_.Init("", "", false));
   EXPECT_EQ("canary-channel", params_.target_channel());
   EXPECT_TRUE(params_.is_powerwash_allowed());
@@ -141,7 +142,7 @@
 TEST_F(OmahaRequestParamsTest, SetTargetChannelInvalidTest) {
   {
     OmahaRequestParams params(&fake_system_state_);
-    params.set_root(tempdir_.path().value());
+    params.set_root(tempdir_.GetPath().value());
     SetLockDown(true);
     EXPECT_TRUE(params.Init("", "", false));
     string error_message;
@@ -151,7 +152,7 @@
     EXPECT_NE(string::npos, error_message.find("stable-channel"));
     EXPECT_FALSE(params.is_powerwash_allowed());
   }
-  params_.set_root(tempdir_.path().value());
+  params_.set_root(tempdir_.GetPath().value());
   EXPECT_TRUE(params_.Init("", "", false));
   EXPECT_EQ("stable-channel", params_.target_channel());
   EXPECT_FALSE(params_.is_powerwash_allowed());
diff --git a/omaha_response_handler_action_unittest.cc b/omaha_response_handler_action_unittest.cc
index 60b139b..13e2e93 100644
--- a/omaha_response_handler_action_unittest.cc
+++ b/omaha_response_handler_action_unittest.cc
@@ -334,7 +334,7 @@
 
   OmahaRequestParams params(&fake_system_state_);
   fake_system_state_.fake_hardware()->SetIsOfficialBuild(false);
-  params.set_root(tempdir.path().value());
+  params.set_root(tempdir.GetPath().value());
   params.set_current_channel("canary-channel");
   // The ImageProperties in Android uses prefs to store MutableImageProperties.
 #ifdef __ANDROID__
@@ -369,7 +369,7 @@
 
   OmahaRequestParams params(&fake_system_state_);
   fake_system_state_.fake_hardware()->SetIsOfficialBuild(false);
-  params.set_root(tempdir.path().value());
+  params.set_root(tempdir.GetPath().value());
   params.set_current_channel("stable-channel");
   // The ImageProperties in Android uses prefs to store MutableImageProperties.
 #ifdef __ANDROID__
diff --git a/payload_consumer/delta_performer_unittest.cc b/payload_consumer/delta_performer_unittest.cc
index ea35c47..4af21e8 100644
--- a/payload_consumer/delta_performer_unittest.cc
+++ b/payload_consumer/delta_performer_unittest.cc
@@ -832,8 +832,8 @@
 
   base::ScopedTempDir temp_dir;
   ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
-  string non_existing_file = temp_dir.path().Append("non-existing").value();
-  string existing_file = temp_dir.path().Append("existing").value();
+  string non_existing_file = temp_dir.GetPath().Append("non-existing").value();
+  string existing_file = temp_dir.GetPath().Append("existing").value();
   EXPECT_EQ(0, System(base::StringPrintf("touch %s", existing_file.c_str())));
 
   // Non-official build, non-existing public-key, key in response -> true