OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/configuration_policy_pref_store.h" | 5 #include "chrome/browser/policy/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/logging.h" | 11 #include "base/logging.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/policy/browser_policy_connector.h" | 15 #include "chrome/browser/policy/browser_policy_connector.h" |
16 #include "chrome/browser/policy/configuration_policy_handler.h" | 16 #include "chrome/browser/policy/configuration_policy_handler.h" |
17 #include "chrome/browser/policy/policy_error_map.h" | 17 #include "chrome/browser/policy/policy_error_map.h" |
18 #include "chrome/browser/policy/policy_map.h" | 18 #include "chrome/browser/policy/policy_map.h" |
19 #include "chrome/browser/prefs/pref_value_map.h" | 19 #include "chrome/browser/prefs/pref_value_map.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "policy/policy_constants.h" | 21 #include "policy/policy_constants.h" |
22 | 22 |
| 23 using content::BrowserThread; |
| 24 |
23 namespace policy { | 25 namespace policy { |
24 | 26 |
25 namespace { | 27 namespace { |
26 | 28 |
27 // Policies are loaded early on startup, before PolicyErrorMaps are ready to | 29 // Policies are loaded early on startup, before PolicyErrorMaps are ready to |
28 // be retrieved. This function is posted to UI to log any errors found on | 30 // be retrieved. This function is posted to UI to log any errors found on |
29 // Refresh below. | 31 // Refresh below. |
30 void LogErrors(PolicyErrorMap* errors) { | 32 void LogErrors(PolicyErrorMap* errors) { |
31 PolicyErrorMap::const_iterator iter; | 33 PolicyErrorMap::const_iterator iter; |
32 for (iter = errors->begin(); iter != errors->end(); ++iter) { | 34 for (iter = errors->begin(); iter != errors->end(); ++iter) { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // issue during startup. | 176 // issue during startup. |
175 BrowserThread::PostTask(BrowserThread::UI, | 177 BrowserThread::PostTask(BrowserThread::UI, |
176 FROM_HERE, | 178 FROM_HERE, |
177 base::Bind(&LogErrors, | 179 base::Bind(&LogErrors, |
178 base::Owned(errors.release()))); | 180 base::Owned(errors.release()))); |
179 | 181 |
180 return prefs.release(); | 182 return prefs.release(); |
181 } | 183 } |
182 | 184 |
183 } // namespace policy | 185 } // namespace policy |
OLD | NEW |