| 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 "components/policy/core/browser/configuration_policy_pref_store.h" | 5 #include "components/policy/core/browser/configuration_policy_pref_store.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/prefs/pref_value_map.h" | |
| 14 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 15 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 17 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
| 18 #include "components/policy/core/browser/configuration_policy_handler_list.h" | 17 #include "components/policy/core/browser/configuration_policy_handler_list.h" |
| 19 #include "components/policy/core/browser/policy_error_map.h" | 18 #include "components/policy/core/browser/policy_error_map.h" |
| 19 #include "components/prefs/pref_value_map.h" |
| 20 | 20 |
| 21 namespace policy { | 21 namespace policy { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Policies are loaded early on startup, before PolicyErrorMaps are ready to | 25 // Policies are loaded early on startup, before PolicyErrorMaps are ready to |
| 26 // be retrieved. This function is posted to UI to log any errors found on | 26 // be retrieved. This function is posted to UI to log any errors found on |
| 27 // Refresh below. | 27 // Refresh below. |
| 28 void LogErrors(PolicyErrorMap* errors) { | 28 void LogErrors(PolicyErrorMap* errors) { |
| 29 PolicyErrorMap::const_iterator iter; | 29 PolicyErrorMap::const_iterator iter; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 // Retrieve and log the errors once the UI loop is ready. This is only an | 127 // Retrieve and log the errors once the UI loop is ready. This is only an |
| 128 // issue during startup. | 128 // issue during startup. |
| 129 base::ThreadTaskRunnerHandle::Get()->PostTask( | 129 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 130 FROM_HERE, base::Bind(&LogErrors, base::Owned(errors.release()))); | 130 FROM_HERE, base::Bind(&LogErrors, base::Owned(errors.release()))); |
| 131 | 131 |
| 132 return prefs.release(); | 132 return prefs.release(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace policy | 135 } // namespace policy |
| OLD | NEW |