Chromium Code Reviews| 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/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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 437 } | 437 } |
| 438 | 438 |
| 439 // static | 439 // static |
| 440 ConfigurationPolicyProvider* | 440 ConfigurationPolicyProvider* |
| 441 BrowserPolicyConnector::CreateManagedPlatformProvider() { | 441 BrowserPolicyConnector::CreateManagedPlatformProvider() { |
| 442 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); | 442 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); |
| 443 #if defined(OS_WIN) | 443 #if defined(OS_WIN) |
| 444 return new ConfigurationPolicyProviderWin(policy_list); | 444 return new ConfigurationPolicyProviderWin(policy_list); |
| 445 #elif defined(OS_MACOSX) | 445 #elif defined(OS_MACOSX) |
| 446 return new ConfigurationPolicyProviderMac(policy_list); | 446 return new ConfigurationPolicyProviderMac(policy_list); |
| 447 #elif defined(OS_POSIX) | 447 #elif defined(OS_POSIX) && !defined(OS_OPENBSD) |
|
Mattias Nissler (ping if slow)
2011/11/10 00:17:53
So no policy support for chromium on OpenBSD? The
| |
| 448 FilePath config_dir_path; | 448 FilePath config_dir_path; |
| 449 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { | 449 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { |
| 450 return new ConfigDirPolicyProvider( | 450 return new ConfigDirPolicyProvider( |
| 451 policy_list, | 451 policy_list, |
| 452 config_dir_path.Append(FILE_PATH_LITERAL("managed"))); | 452 config_dir_path.Append(FILE_PATH_LITERAL("managed"))); |
| 453 } else { | 453 } else { |
| 454 return NULL; | 454 return NULL; |
| 455 } | 455 } |
| 456 #else | 456 #else |
| 457 return NULL; | 457 return NULL; |
| 458 #endif | 458 #endif |
| 459 } | 459 } |
| 460 | 460 |
| 461 // static | 461 // static |
| 462 ConfigurationPolicyProvider* | 462 ConfigurationPolicyProvider* |
| 463 BrowserPolicyConnector::CreateRecommendedPlatformProvider() { | 463 BrowserPolicyConnector::CreateRecommendedPlatformProvider() { |
| 464 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 464 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) |
| 465 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); | 465 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); |
| 466 FilePath config_dir_path; | 466 FilePath config_dir_path; |
| 467 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { | 467 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { |
| 468 return new ConfigDirPolicyProvider( | 468 return new ConfigDirPolicyProvider( |
| 469 policy_list, | 469 policy_list, |
| 470 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); | 470 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); |
| 471 } else { | 471 } else { |
| 472 return NULL; | 472 return NULL; |
| 473 } | 473 } |
| 474 #else | 474 #else |
| 475 return NULL; | 475 return NULL; |
| 476 #endif | 476 #endif |
| 477 } | 477 } |
| 478 | 478 |
| 479 } // namespace policy | 479 } // namespace policy |
| OLD | NEW |