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

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

Issue 8341052: share all the needed linux code with OpenBSD in chrome and content (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove unused header Created 9 years, 1 month 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) 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 433 }
434 434
435 // static 435 // static
436 ConfigurationPolicyProvider* 436 ConfigurationPolicyProvider*
437 BrowserPolicyConnector::CreateManagedPlatformProvider() { 437 BrowserPolicyConnector::CreateManagedPlatformProvider() {
438 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); 438 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList();
439 #if defined(OS_WIN) 439 #if defined(OS_WIN)
440 return new ConfigurationPolicyProviderWin(policy_list); 440 return new ConfigurationPolicyProviderWin(policy_list);
441 #elif defined(OS_MACOSX) 441 #elif defined(OS_MACOSX)
442 return new ConfigurationPolicyProviderMac(policy_list); 442 return new ConfigurationPolicyProviderMac(policy_list);
443 #elif defined(OS_POSIX) 443 #elif defined(OS_POSIX) && !defined(OS_OPENBSD)
444 FilePath config_dir_path; 444 FilePath config_dir_path;
445 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { 445 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) {
446 return new ConfigDirPolicyProvider( 446 return new ConfigDirPolicyProvider(
447 policy_list, 447 policy_list,
448 config_dir_path.Append(FILE_PATH_LITERAL("managed"))); 448 config_dir_path.Append(FILE_PATH_LITERAL("managed")));
449 } else { 449 } else {
450 return NULL; 450 return NULL;
451 } 451 }
452 #else 452 #else
453 return NULL; 453 return NULL;
454 #endif 454 #endif
455 } 455 }
456 456
457 // static 457 // static
458 ConfigurationPolicyProvider* 458 ConfigurationPolicyProvider*
459 BrowserPolicyConnector::CreateRecommendedPlatformProvider() { 459 BrowserPolicyConnector::CreateRecommendedPlatformProvider() {
460 #if defined(OS_POSIX) && !defined(OS_MACOSX) 460 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
461 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); 461 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList();
462 FilePath config_dir_path; 462 FilePath config_dir_path;
463 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { 463 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) {
464 return new ConfigDirPolicyProvider( 464 return new ConfigDirPolicyProvider(
465 policy_list, 465 policy_list,
466 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); 466 config_dir_path.Append(FILE_PATH_LITERAL("recommended")));
467 } else { 467 } else {
468 return NULL; 468 return NULL;
469 } 469 }
470 #else 470 #else
471 return NULL; 471 return NULL;
472 #endif 472 #endif
473 } 473 }
474 474
475 } // namespace policy 475 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698