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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 #include "policy/policy_constants.h" | 26 #include "policy/policy_constants.h" |
27 | 27 |
28 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
29 #include "components/policy/core/common/policy_loader_win.h" | 29 #include "components/policy/core/common/policy_loader_win.h" |
30 #elif defined(OS_MACOSX) | 30 #elif defined(OS_MACOSX) |
31 #include <CoreFoundation/CoreFoundation.h> | 31 #include <CoreFoundation/CoreFoundation.h> |
32 #include "components/policy/core/common/policy_loader_mac.h" | 32 #include "components/policy/core/common/policy_loader_mac.h" |
33 #include "components/policy/core/common/preferences_mac.h" | 33 #include "components/policy/core/common/preferences_mac.h" |
34 #elif defined(OS_POSIX) && !defined(OS_ANDROID) | 34 #elif defined(OS_POSIX) && !defined(OS_ANDROID) |
35 #include "components/policy/core/common/config_dir_policy_loader.h" | 35 #include "components/policy/core/common/config_dir_policy_loader.h" |
36 #elif defined(OS_ANDROID) | |
37 #include "components/policy/core/common/policy_provider_android.h" | |
36 #endif | 38 #endif |
37 | 39 |
38 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
39 #include "chromeos/system/statistics_provider.h" | 41 #include "chromeos/system/statistics_provider.h" |
40 #endif | 42 #endif |
41 | 43 |
42 using content::BrowserThread; | 44 using content::BrowserThread; |
43 | 45 |
44 namespace policy { | 46 namespace policy { |
45 | 47 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 base::FilePath config_dir_path; | 175 base::FilePath config_dir_path; |
174 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { | 176 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { |
175 scoped_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader( | 177 scoped_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader( |
176 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 178 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
177 config_dir_path, | 179 config_dir_path, |
178 POLICY_SCOPE_MACHINE)); | 180 POLICY_SCOPE_MACHINE)); |
179 return new AsyncPolicyProvider(GetSchemaRegistry(), loader.Pass()); | 181 return new AsyncPolicyProvider(GetSchemaRegistry(), loader.Pass()); |
180 } else { | 182 } else { |
181 return NULL; | 183 return NULL; |
182 } | 184 } |
185 #elif defined(OS_ANDROID) | |
186 return new PolicyProviderAndroid(); | |
Joao da Silva
2014/02/05 20:22:26
Question: how will you get this provider to set it
| |
183 #else | 187 #else |
184 return NULL; | 188 return NULL; |
185 #endif | 189 #endif |
186 } | 190 } |
187 | 191 |
188 } // namespace policy | 192 } // namespace policy |
OLD | NEW |