| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/policy/browser_policy_connector.h" | 5 #include "chrome/browser/policy/browser_policy_connector.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/message_loop/message_loop_proxy.h" | 16 #include "base/message_loop/message_loop_proxy.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/prefs/pref_registry_simple.h" | 18 #include "base/prefs/pref_registry_simple.h" |
| 19 #include "base/prefs/pref_service.h" | 19 #include "base/prefs/pref_service.h" |
| 20 #include "base/sequenced_task_runner.h" | |
| 21 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
| 22 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
| 23 #include "base/strings/sys_string_conversions.h" | 22 #include "base/strings/sys_string_conversions.h" |
| 24 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
| 25 #include "base/sys_info.h" | 24 #include "base/sys_info.h" |
| 26 #include "base/threading/sequenced_worker_pool.h" | 25 #include "base/threading/sequenced_worker_pool.h" |
| 27 #include "chrome/browser/browser_process.h" | 26 #include "chrome/browser/browser_process.h" |
| 28 #include "chrome/browser/policy/async_policy_provider.h" | 27 #include "chrome/browser/policy/async_policy_provider.h" |
| 29 #include "chrome/browser/policy/cloud/cloud_policy_client.h" | 28 #include "chrome/browser/policy/cloud/cloud_policy_client.h" |
| 30 #include "chrome/browser/policy/cloud/cloud_policy_refresh_scheduler.h" | 29 #include "chrome/browser/policy/cloud/cloud_policy_refresh_scheduler.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 status_provider.Pass()); | 287 status_provider.Pass()); |
| 289 } | 288 } |
| 290 | 289 |
| 291 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 290 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 292 if (!command_line->HasSwitch(chromeos::switches::kDisableLocalAccounts)) { | 291 if (!command_line->HasSwitch(chromeos::switches::kDisableLocalAccounts)) { |
| 293 device_local_account_policy_service_.reset( | 292 device_local_account_policy_service_.reset( |
| 294 new DeviceLocalAccountPolicyService( | 293 new DeviceLocalAccountPolicyService( |
| 295 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), | 294 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), |
| 296 chromeos::DeviceSettingsService::Get(), | 295 chromeos::DeviceSettingsService::Get(), |
| 297 chromeos::CrosSettings::Get(), | 296 chromeos::CrosSettings::Get(), |
| 298 GetBackgroundTaskRunner(), | |
| 299 GetBackgroundTaskRunner())); | 297 GetBackgroundTaskRunner())); |
| 300 device_local_account_policy_service_->Connect( | 298 device_local_account_policy_service_->Connect( |
| 301 device_management_service_.get()); | 299 device_management_service_.get()); |
| 302 } | 300 } |
| 303 | 301 |
| 304 GetAppPackUpdater(); | 302 GetAppPackUpdater(); |
| 305 | 303 |
| 306 SetTimezoneIfPolicyAvailable(); | 304 SetTimezoneIfPolicyAvailable(); |
| 307 #endif | 305 #endif |
| 308 | 306 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 return new AsyncPolicyProvider(loader.Pass()); | 571 return new AsyncPolicyProvider(loader.Pass()); |
| 574 } else { | 572 } else { |
| 575 return NULL; | 573 return NULL; |
| 576 } | 574 } |
| 577 #else | 575 #else |
| 578 return NULL; | 576 return NULL; |
| 579 #endif | 577 #endif |
| 580 } | 578 } |
| 581 | 579 |
| 582 } // namespace policy | 580 } // namespace policy |
| OLD | NEW |