diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-20 17:12:21 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-20 17:12:21 +0000 |
commit | 68a31b1b3ed40a9146d45cd0e262a0d939275c48 (patch) | |
tree | f8f583fce8c364524582dfb3e26dc0ac5a67b855 /chromeos/chromeos_paths.cc | |
parent | 0338bc66f67d96b53fa872c3df248611ce4d1c83 (diff) | |
download | chromium_src-68a31b1b3ed40a9146d45cd0e262a0d939275c48.zip chromium_src-68a31b1b3ed40a9146d45cd0e262a0d939275c48.tar.gz chromium_src-68a31b1b3ed40a9146d45cd0e262a0d939275c48.tar.bz2 |
Wire up component cloud policy to device local accounts.
Note: this is a reland of https://codereview.chromium.org/341043005 which was
reverted due to memory leaks in tests. Those leaks were fixed in
https://codereview.chromium.org/348713004.
This enables policy-for-extensions running in Public Sessions, and for
extensions running as Kiosk Apps too.
TBR=bartfab@chromium.org
BUG=224596
Review URL: https://codereview.chromium.org/335113008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/chromeos_paths.cc')
-rw-r--r-- | chromeos/chromeos_paths.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chromeos/chromeos_paths.cc b/chromeos/chromeos_paths.cc index a9963af..f629c45 100644 --- a/chromeos/chromeos_paths.cc +++ b/chromeos/chromeos_paths.cc @@ -41,6 +41,9 @@ const base::FilePath::CharType kDeviceLocalAccountExtensionDir[] = const base::FilePath::CharType kDeviceLocalAccountExternalDataDir[] = FILE_PATH_LITERAL("/var/cache/device_local_account_external_policy_data"); +const base::FilePath::CharType kDeviceLocalAccountComponentPolicy[] = + FILE_PATH_LITERAL("/var/cache/device_local_account_component_policy"); + bool PathProvider(int key, base::FilePath* result) { switch (key) { case FILE_DEFAULT_APP_ORDER: @@ -67,6 +70,9 @@ bool PathProvider(int key, base::FilePath* result) { case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA: *result = base::FilePath(kDeviceLocalAccountExternalDataDir); break; + case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY: + *result = base::FilePath(kDeviceLocalAccountComponentPolicy); + break; default: return false; } @@ -99,6 +105,15 @@ void RegisterStubPathOverrides(const base::FilePath& stubs_dir) { parent.AppendASCII("stub_install_attributes.pb"), is_absolute, create); + PathService::Override( + DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, + parent.AppendASCII("stub_device_local_account_extensions")); + PathService::Override( + DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA, + parent.AppendASCII("stub_device_local_account_external_data")); + PathService::Override( + DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, + parent.AppendASCII("stub_device_local_account_component_policy")); } } // namespace chromeos |