| 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/chromeos/policy/user_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/prefs/pref_registry_simple.h" | 12 #include "base/prefs/pref_registry_simple.h" |
| 13 #include "base/prefs/testing_pref_service.h" | 13 #include "base/prefs/testing_pref_service.h" |
| 14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 15 #include "base/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.h" | 17 #include "chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.h" |
| 18 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 18 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 19 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | 19 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" |
| 20 #include "chrome/browser/policy/cloud/cloud_policy_service.h" | 20 #include "chrome/browser/policy/cloud/cloud_policy_service.h" |
| 21 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h" | 21 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h" |
| 22 #include "chrome/browser/policy/cloud/mock_device_management_service.h" | 22 #include "chrome/browser/policy/cloud/mock_device_management_service.h" |
| 23 #include "chrome/browser/policy/cloud/resource_cache.h" | 23 #include "chrome/browser/policy/cloud/resource_cache.h" |
| 24 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 24 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
| 25 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" | 25 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 506 |
| 507 // The refresh scheduler takes care of the initial fetch for unmanaged users. | 507 // The refresh scheduler takes care of the initial fetch for unmanaged users. |
| 508 // It posts a delayed task with 0ms delay in this case, so spinning the loop | 508 // It posts a delayed task with 0ms delay in this case, so spinning the loop |
| 509 // issues the initial fetch. | 509 // issues the initial fetch. |
| 510 base::RunLoop loop; | 510 base::RunLoop loop; |
| 511 FetchPolicy( | 511 FetchPolicy( |
| 512 base::Bind(&base::RunLoop::RunUntilIdle, base::Unretained(&loop))); | 512 base::Bind(&base::RunLoop::RunUntilIdle, base::Unretained(&loop))); |
| 513 } | 513 } |
| 514 | 514 |
| 515 } // namespace policy | 515 } // namespace policy |
| OLD | NEW |