| Index: chrome/browser/policy/browser_policy_connector.cc
|
| diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
|
| index 382d6d2ea899b6fed5a1267d1422f2ec0817c56b..ce6c17fba7f1575922f33096c1f45c9bab511121 100644
|
| --- a/chrome/browser/policy/browser_policy_connector.cc
|
| +++ b/chrome/browser/policy/browser_policy_connector.cc
|
| @@ -29,16 +29,10 @@
|
| #endif
|
|
|
| #if defined(OS_CHROMEOS)
|
| +#include "chrome/browser/policy/device_policy_cache.h"
|
| #include "chrome/browser/policy/device_policy_identity_strategy.h"
|
| #endif
|
|
|
| -namespace {
|
| -
|
| -const FilePath::CharType kDevicePolicyCacheFile[] =
|
| - FILE_PATH_LITERAL("Policy");
|
| -
|
| -} // namespace
|
| -
|
| namespace policy {
|
|
|
| BrowserPolicyConnector::BrowserPolicyConnector() {
|
| @@ -49,20 +43,11 @@ BrowserPolicyConnector::BrowserPolicyConnector() {
|
|
|
| #if defined(OS_CHROMEOS)
|
| CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| - if (command_line->HasSwitch(switches::kDevicePolicyCacheDir)) {
|
| - FilePath cache_dir(command_line->GetSwitchValuePath(
|
| - switches::kDevicePolicyCacheDir));
|
| -
|
| - if (!file_util::CreateDirectory(cache_dir)) {
|
| - LOG(WARNING) << "Device policy cache directory "
|
| - << cache_dir.value()
|
| - << " is not accessible, skipping initialization.";
|
| - } else {
|
| - identity_strategy_.reset(new DevicePolicyIdentityStrategy());
|
| - cloud_policy_subsystem_.reset(
|
| - new CloudPolicySubsystem(cache_dir.Append(kDevicePolicyCacheFile),
|
| - identity_strategy_.get()));
|
| - }
|
| + if (command_line->HasSwitch(switches::kEnableDevicePolicy)) {
|
| + identity_strategy_.reset(new DevicePolicyIdentityStrategy());
|
| + cloud_policy_subsystem_.reset(
|
| + new CloudPolicySubsystem(identity_strategy_.get(),
|
| + new DevicePolicyCache()));
|
| }
|
| #endif
|
| }
|
|
|