Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6699)

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 2317123002: c/browser, c/common, components O-P: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 7abcc4c0d0c90f3f18e52228a430e2590bb69142..3f48807728804af2afebf533bd3f35a21f64a875 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1507,28 +1507,29 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DownloadDirectory) {
base::ScopedTempDir initial_dir;
ASSERT_TRUE(initial_dir.CreateUniqueTempDir());
browser()->profile()->GetPrefs()->SetFilePath(
- prefs::kDownloadDefaultDirectory, initial_dir.path());
+ prefs::kDownloadDefaultDirectory, initial_dir.GetPath());
// Don't prompt for the download location during this test.
browser()->profile()->GetPrefs()->SetBoolean(
prefs::kPromptForDownload, false);
// Verify that downloads end up on the default directory.
base::FilePath file(FILE_PATH_LITERAL("download-test1.lib"));
- DownloadAndVerifyFile(browser(), initial_dir.path(), file);
- base::DieFileDie(initial_dir.path().Append(file), false);
+ DownloadAndVerifyFile(browser(), initial_dir.GetPath(), file);
+ base::DieFileDie(initial_dir.GetPath().Append(file), false);
// Override the download directory with the policy and verify a download.
base::ScopedTempDir forced_dir;
ASSERT_TRUE(forced_dir.CreateUniqueTempDir());
PolicyMap policies;
- policies.Set(key::kDownloadDirectory, POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::StringValue>(forced_dir.path().value()),
- nullptr);
+ policies.Set(
+ key::kDownloadDirectory, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
+ base::MakeUnique<base::StringValue>(forced_dir.GetPath().value()),
+ nullptr);
UpdateProviderPolicy(policies);
- DownloadAndVerifyFile(browser(), forced_dir.path(), file);
+ DownloadAndVerifyFile(browser(), forced_dir.GetPath(), file);
// Verify that the first download location wasn't affected.
- EXPECT_FALSE(base::PathExists(initial_dir.path().Append(file)));
+ EXPECT_FALSE(base::PathExists(initial_dir.GetPath().Append(file)));
}
IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionInstallBlacklistSelective) {
@@ -1896,7 +1897,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, MAYBE_ExtensionInstallSources) {
ASSERT_TRUE(download_directory.CreateUniqueTempDir());
DownloadPrefs* download_prefs =
DownloadPrefs::FromBrowserContext(browser()->profile());
- download_prefs->SetDownloadPath(download_directory.path());
+ download_prefs->SetDownloadPath(download_directory.GetPath());
const GURL download_page_url(URLRequestMockHTTPJob::GetMockUrl(
"policy/extension_install_sources_test.html"));
« no previous file with comments | « chrome/browser/policy/cloud/cloud_policy_browsertest.cc ('k') | chrome/browser/policy/test/local_policy_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698