OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_browser_policy_connector.h" | 5 #include "chrome/browser/policy/chrome_browser_policy_connector.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "policy/policy_constants.h" | 27 #include "policy/policy_constants.h" |
28 | 28 |
29 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
30 #include "components/policy/core/common/policy_loader_win.h" | 30 #include "components/policy/core/common/policy_loader_win.h" |
31 #elif defined(OS_MACOSX) | 31 #elif defined(OS_MACOSX) |
32 #include <CoreFoundation/CoreFoundation.h> | 32 #include <CoreFoundation/CoreFoundation.h> |
33 #include "components/policy/core/common/policy_loader_mac.h" | 33 #include "components/policy/core/common/policy_loader_mac.h" |
34 #include "components/policy/core/common/preferences_mac.h" | 34 #include "components/policy/core/common/preferences_mac.h" |
35 #elif defined(OS_POSIX) && !defined(OS_ANDROID) | 35 #elif defined(OS_POSIX) && !defined(OS_ANDROID) |
36 #include "components/policy/core/common/config_dir_policy_loader.h" | 36 #include "components/policy/core/common/config_dir_policy_loader.h" |
| 37 #elif defined(OS_ANDROID) |
| 38 #include "components/policy/core/common/policy_provider_android.h" |
37 #endif | 39 #endif |
38 | 40 |
39 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
40 #include "chromeos/system/statistics_provider.h" | 42 #include "chromeos/system/statistics_provider.h" |
41 #endif | 43 #endif |
42 | 44 |
43 using content::BrowserThread; | 45 using content::BrowserThread; |
44 | 46 |
45 namespace policy { | 47 namespace policy { |
46 | 48 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 base::FilePath config_dir_path; | 176 base::FilePath config_dir_path; |
175 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { | 177 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { |
176 scoped_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader( | 178 scoped_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader( |
177 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 179 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
178 config_dir_path, | 180 config_dir_path, |
179 POLICY_SCOPE_MACHINE)); | 181 POLICY_SCOPE_MACHINE)); |
180 return new AsyncPolicyProvider(GetSchemaRegistry(), loader.Pass()); | 182 return new AsyncPolicyProvider(GetSchemaRegistry(), loader.Pass()); |
181 } else { | 183 } else { |
182 return NULL; | 184 return NULL; |
183 } | 185 } |
| 186 #elif defined(OS_ANDROID) |
| 187 return new PolicyProviderAndroid(); |
184 #else | 188 #else |
185 return NULL; | 189 return NULL; |
186 #endif | 190 #endif |
187 } | 191 } |
188 | 192 |
189 } // namespace policy | 193 } // namespace policy |
OLD | NEW |