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

Unified Diff: chrome/browser/chromeos/policy/device_local_account_browsertest.cc

Issue 342233005: Move ownership of the ComponentCloudPolicyService to the broker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_local_account_policy_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/device_local_account_browsertest.cc
diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
index 59ad4682486a948f0af9eec382a09395bad76df6..c58f8fe708694b956aeaa8532214270bfb3d0beb 100644
--- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
@@ -421,10 +421,13 @@ class DeviceLocalAccountTest : public DevicePolicyCrosBrowserTest,
EXPECT_EQ(chromeos::User::USER_TYPE_PUBLIC_ACCOUNT, user->GetType());
}
- base::FilePath GetCacheDirectoryForAccountID(const std::string& account_id) {
+ base::FilePath GetExtensionCacheDirectoryForAccountID(
+ const std::string& account_id) {
base::FilePath extension_cache_root_dir;
- PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS,
- &extension_cache_root_dir);
+ if (!PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS,
+ &extension_cache_root_dir)) {
+ ADD_FAILURE();
+ }
return extension_cache_root_dir.Append(
base::HexEncode(account_id.c_str(), account_id.size()));
}
@@ -432,7 +435,7 @@ class DeviceLocalAccountTest : public DevicePolicyCrosBrowserTest,
base::FilePath GetCacheCRXFile(const std::string& account_id,
const std::string& id,
const std::string& version) {
- return GetCacheDirectoryForAccountID(account_id)
+ return GetExtensionCacheDirectoryForAccountID(account_id)
.Append(base::StringPrintf("%s-%s.crx", id.c_str(), version.c_str()));
}
@@ -764,7 +767,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsCached) {
// Pre-populate the device local account's extension cache with a hosted app
// and an extension.
EXPECT_TRUE(base::CreateDirectory(
- GetCacheDirectoryForAccountID(kAccountId1)));
+ GetExtensionCacheDirectoryForAccountID(kAccountId1)));
base::FilePath test_dir;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
const base::FilePath cached_hosted_app =
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_local_account_policy_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698