Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(930)

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 10496013: Implement the mac policy provider based on the AsyncPolicyLoader. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/policy/browser_policy_connector.h" 5 #include "chrome/browser/policy/browser_policy_connector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/common/net/gaia/gaia_constants.h" 23 #include "chrome/common/net/gaia/gaia_constants.h"
24 #include "chrome/common/pref_names.h" 24 #include "chrome/common/pref_names.h"
25 #include "content/public/browser/notification_details.h" 25 #include "content/public/browser/notification_details.h"
26 #include "content/public/browser/notification_source.h" 26 #include "content/public/browser/notification_source.h"
27 #include "grit/generated_resources.h" 27 #include "grit/generated_resources.h"
28 #include "policy/policy_constants.h" 28 #include "policy/policy_constants.h"
29 29
30 #if defined(OS_WIN) 30 #if defined(OS_WIN)
31 #include "chrome/browser/policy/configuration_policy_provider_win.h" 31 #include "chrome/browser/policy/configuration_policy_provider_win.h"
32 #elif defined(OS_MACOSX) 32 #elif defined(OS_MACOSX)
33 #include "chrome/browser/policy/configuration_policy_provider_mac.h" 33 #include "chrome/browser/policy/policy_loader_mac.h"
34 #elif defined(OS_POSIX) 34 #elif defined(OS_POSIX)
35 #include "chrome/browser/policy/config_dir_policy_provider.h" 35 #include "chrome/browser/policy/config_dir_policy_provider.h"
36 #endif 36 #endif
37 37
38 #if defined(OS_CHROMEOS) 38 #if defined(OS_CHROMEOS)
39 #include "chrome/browser/chromeos/cros/cros_library.h" 39 #include "chrome/browser/chromeos/cros/cros_library.h"
40 #include "chrome/browser/chromeos/system/statistics_provider.h" 40 #include "chrome/browser/chromeos/system/statistics_provider.h"
41 #include "chrome/browser/policy/app_pack_updater.h" 41 #include "chrome/browser/policy/app_pack_updater.h"
42 #include "chrome/browser/policy/cros_user_policy_cache.h" 42 #include "chrome/browser/policy/cros_user_policy_cache.h"
43 #include "chrome/browser/policy/device_policy_cache.h" 43 #include "chrome/browser/policy/device_policy_cache.h"
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 #endif 500 #endif
501 } 501 }
502 502
503 // static 503 // static
504 ConfigurationPolicyProvider* 504 ConfigurationPolicyProvider*
505 BrowserPolicyConnector::CreateManagedPlatformProvider() { 505 BrowserPolicyConnector::CreateManagedPlatformProvider() {
506 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); 506 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList();
507 #if defined(OS_WIN) 507 #if defined(OS_WIN)
508 return new ConfigurationPolicyProviderWin(policy_list); 508 return new ConfigurationPolicyProviderWin(policy_list);
509 #elif defined(OS_MACOSX) 509 #elif defined(OS_MACOSX)
510 return new ConfigurationPolicyProviderMac(policy_list); 510 return MacPolicyLoader::CreateProvider(policy_list);
511 #elif defined(OS_POSIX) 511 #elif defined(OS_POSIX)
512 FilePath config_dir_path; 512 FilePath config_dir_path;
513 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { 513 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) {
514 return new ConfigDirPolicyProvider( 514 return new ConfigDirPolicyProvider(
515 policy_list, 515 policy_list,
516 POLICY_LEVEL_MANDATORY, 516 POLICY_LEVEL_MANDATORY,
517 POLICY_SCOPE_MACHINE, 517 POLICY_SCOPE_MACHINE,
518 config_dir_path.Append(FILE_PATH_LITERAL("managed"))); 518 config_dir_path.Append(FILE_PATH_LITERAL("managed")));
519 } else { 519 } else {
520 return NULL; 520 return NULL;
(...skipping 17 matching lines...) Expand all
538 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); 538 config_dir_path.Append(FILE_PATH_LITERAL("recommended")));
539 } else { 539 } else {
540 return NULL; 540 return NULL;
541 } 541 }
542 #else 542 #else
543 return NULL; 543 return NULL;
544 #endif 544 #endif
545 } 545 }
546 546
547 } // namespace policy 547 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/config_dir_policy_provider_unittest.cc » ('j') | chrome/browser/policy/policy_loader_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698