| 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/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/message_loop/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/sequenced_task_runner.h" | 14 #include "base/sequenced_task_runner.h" |
| 15 #include "base/thread_task_runner_handle.h" |
| 15 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
| 16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 17 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
| 18 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 19 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 19 #include "chrome/browser/chromeos/policy/user_cloud_external_data_manager.h" | 20 #include "chrome/browser/chromeos/policy/user_cloud_external_data_manager.h" |
| 20 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" | 21 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" |
| 21 #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h" | 22 #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h" |
| 22 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 23 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 23 #include "chrome/browser/chromeos/settings/cros_settings.h" | 24 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 24 #include "chrome/browser/policy/schema_registry_service.h" | 25 #include "chrome/browser/policy/schema_registry_service.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 store->LoadImmediately(); | 198 store->LoadImmediately(); |
| 198 | 199 |
| 199 scoped_refptr<base::SequencedTaskRunner> file_task_runner = | 200 scoped_refptr<base::SequencedTaskRunner> file_task_runner = |
| 200 content::BrowserThread::GetMessageLoopProxyForThread( | 201 content::BrowserThread::GetMessageLoopProxyForThread( |
| 201 content::BrowserThread::FILE); | 202 content::BrowserThread::FILE); |
| 202 | 203 |
| 203 scoped_ptr<UserCloudPolicyManagerChromeOS> manager( | 204 scoped_ptr<UserCloudPolicyManagerChromeOS> manager( |
| 204 new UserCloudPolicyManagerChromeOS( | 205 new UserCloudPolicyManagerChromeOS( |
| 205 store.Pass(), external_data_manager.Pass(), | 206 store.Pass(), external_data_manager.Pass(), |
| 206 component_policy_cache_dir, wait_for_initial_policy, | 207 component_policy_cache_dir, wait_for_initial_policy, |
| 207 initial_policy_fetch_timeout, base::MessageLoopProxy::current(), | 208 initial_policy_fetch_timeout, base::ThreadTaskRunnerHandle::Get(), |
| 208 file_task_runner, io_task_runner)); | 209 file_task_runner, io_task_runner)); |
| 209 | 210 |
| 210 bool wildcard_match = false; | 211 bool wildcard_match = false; |
| 211 if (connector->IsEnterpriseManaged() && | 212 if (connector->IsEnterpriseManaged() && |
| 212 chromeos::CrosSettings::IsWhitelisted(username, &wildcard_match) && | 213 chromeos::CrosSettings::IsWhitelisted(username, &wildcard_match) && |
| 213 wildcard_match && !connector->IsNonEnterpriseUser(username)) { | 214 wildcard_match && !connector->IsNonEnterpriseUser(username)) { |
| 214 manager->EnableWildcardLoginCheck(username); | 215 manager->EnableWildcardLoginCheck(username); |
| 215 } | 216 } |
| 216 | 217 |
| 217 manager->Init( | 218 manager->Init( |
| (...skipping 30 matching lines...) Expand all Loading... |
| 248 | 249 |
| 249 bool UserCloudPolicyManagerFactoryChromeOS::HasTestingFactory( | 250 bool UserCloudPolicyManagerFactoryChromeOS::HasTestingFactory( |
| 250 content::BrowserContext* context) { | 251 content::BrowserContext* context) { |
| 251 return false; | 252 return false; |
| 252 } | 253 } |
| 253 | 254 |
| 254 void UserCloudPolicyManagerFactoryChromeOS::CreateServiceNow( | 255 void UserCloudPolicyManagerFactoryChromeOS::CreateServiceNow( |
| 255 content::BrowserContext* context) {} | 256 content::BrowserContext* context) {} |
| 256 | 257 |
| 257 } // namespace policy | 258 } // namespace policy |
| OLD | NEW |