| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom
eos.h" | 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom
eos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" |
| 7 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 9 #include "base/logging.h" | 10 #include "base/logging.h" |
| 10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 11 #include "base/message_loop/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
| 12 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 13 #include "base/sequenced_task_runner.h" | 14 #include "base/sequenced_task_runner.h" |
| 14 #include "base/threading/sequenced_worker_pool.h" | 15 #include "base/threading/sequenced_worker_pool.h" |
| 15 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 16 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 background_task_runner, | 167 background_task_runner, |
| 167 username, policy_key_dir, token_cache_file, policy_cache_file)); | 168 username, policy_key_dir, token_cache_file, policy_cache_file)); |
| 168 | 169 |
| 169 scoped_refptr<base::SequencedTaskRunner> backend_task_runner = | 170 scoped_refptr<base::SequencedTaskRunner> backend_task_runner = |
| 170 content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( | 171 content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
| 171 content::BrowserThread::GetBlockingPool()->GetSequenceToken()); | 172 content::BrowserThread::GetBlockingPool()->GetSequenceToken()); |
| 172 scoped_refptr<base::SequencedTaskRunner> io_task_runner = | 173 scoped_refptr<base::SequencedTaskRunner> io_task_runner = |
| 173 content::BrowserThread::GetMessageLoopProxyForThread( | 174 content::BrowserThread::GetMessageLoopProxyForThread( |
| 174 content::BrowserThread::IO); | 175 content::BrowserThread::IO); |
| 175 scoped_ptr<CloudExternalDataManager> external_data_manager( | 176 scoped_ptr<CloudExternalDataManager> external_data_manager( |
| 176 new UserCloudExternalDataManager(GetChromePolicyDefinitionList(), | 177 new UserCloudExternalDataManager(base::Bind(&GetChromePolicyDetails), |
| 177 backend_task_runner, | 178 backend_task_runner, |
| 178 io_task_runner, | 179 io_task_runner, |
| 179 external_data_dir, | 180 external_data_dir, |
| 180 store.get())); | 181 store.get())); |
| 181 if (force_immediate_load) | 182 if (force_immediate_load) |
| 182 store->LoadImmediately(); | 183 store->LoadImmediately(); |
| 183 | 184 |
| 184 scoped_ptr<ResourceCache> resource_cache; | 185 scoped_ptr<ResourceCache> resource_cache; |
| 185 if (command_line->HasSwitch(switches::kEnableComponentCloudPolicy)) { | 186 if (command_line->HasSwitch(switches::kEnableComponentCloudPolicy)) { |
| 186 resource_cache.reset(new ResourceCache( | 187 resource_cache.reset(new ResourceCache( |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context); | 226 BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context); |
| 226 } | 227 } |
| 227 | 228 |
| 228 void UserCloudPolicyManagerFactoryChromeOS::SetEmptyTestingFactory( | 229 void UserCloudPolicyManagerFactoryChromeOS::SetEmptyTestingFactory( |
| 229 content::BrowserContext* context) {} | 230 content::BrowserContext* context) {} |
| 230 | 231 |
| 231 void UserCloudPolicyManagerFactoryChromeOS::CreateServiceNow( | 232 void UserCloudPolicyManagerFactoryChromeOS::CreateServiceNow( |
| 232 content::BrowserContext* context) {} | 233 content::BrowserContext* context) {} |
| 233 | 234 |
| 234 } // namespace policy | 235 } // namespace policy |
| OLD | NEW |