OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/configuration_policy_handler_list_factory.h" | 5 #include "chrome/browser/policy/configuration_policy_handler_list_factory.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "chrome/browser/net/disk_cache_dir_policy_handler.h" | 31 #include "chrome/browser/net/disk_cache_dir_policy_handler.h" |
32 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h" | 32 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h" |
33 #include "chrome/browser/policy/javascript_policy_handler.h" | 33 #include "chrome/browser/policy/javascript_policy_handler.h" |
34 #include "chrome/browser/policy/network_prediction_policy_handler.h" | 34 #include "chrome/browser/policy/network_prediction_policy_handler.h" |
35 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" | 35 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" |
36 #include "chrome/browser/sync/sync_policy_handler.h" | 36 #include "chrome/browser/sync/sync_policy_handler.h" |
37 #endif | 37 #endif |
38 | 38 |
39 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
40 #include "ash/magnifier/magnifier_constants.h" | 40 #include "ash/magnifier/magnifier_constants.h" |
41 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
42 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h
" | 41 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h
" |
43 #include "chromeos/dbus/power_policy_controller.h" | 42 #include "chromeos/dbus/power_policy_controller.h" |
44 #include "components/user_manager/user.h" | 43 #include "components/user_manager/user.h" |
| 44 #include "components/user_manager/user_manager.h" |
45 #endif | 45 #endif |
46 | 46 |
47 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 47 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
48 #include "chrome/browser/download/download_dir_policy_handler.h" | 48 #include "chrome/browser/download/download_dir_policy_handler.h" |
49 #endif | 49 #endif |
50 | 50 |
51 #if !defined(OS_MACOSX) && !defined(OS_IOS) | 51 #if !defined(OS_MACOSX) && !defined(OS_IOS) |
52 #include "apps/pref_names.h" | 52 #include "apps/pref_names.h" |
53 #endif | 53 #endif |
54 | 54 |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 "ShowModalDialog_EffectiveUntil20150430", | 528 "ShowModalDialog_EffectiveUntil20150430", |
529 scoped_ptr<base::Value>(new base::StringValue( | 529 scoped_ptr<base::Value>(new base::StringValue( |
530 switches::kEnableShowModalDialog)))); | 530 switches::kEnableShowModalDialog)))); |
531 } | 531 } |
532 #endif // !defined(OS_IOS) | 532 #endif // !defined(OS_IOS) |
533 | 533 |
534 } // namespace | 534 } // namespace |
535 | 535 |
536 void PopulatePolicyHandlerParameters(PolicyHandlerParameters* parameters) { | 536 void PopulatePolicyHandlerParameters(PolicyHandlerParameters* parameters) { |
537 #if defined(OS_CHROMEOS) | 537 #if defined(OS_CHROMEOS) |
538 if (chromeos::UserManager::IsInitialized()) { | 538 if (user_manager::UserManager::IsInitialized()) { |
539 const user_manager::User* user = | 539 const user_manager::User* user = |
540 chromeos::UserManager::Get()->GetActiveUser(); | 540 user_manager::UserManager::Get()->GetActiveUser(); |
541 if (user) | 541 if (user) |
542 parameters->user_id_hash = user->username_hash(); | 542 parameters->user_id_hash = user->username_hash(); |
543 } | 543 } |
544 #endif | 544 #endif |
545 } | 545 } |
546 | 546 |
547 scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList( | 547 scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList( |
548 const Schema& chrome_schema) { | 548 const Schema& chrome_schema) { |
549 scoped_ptr<ConfigurationPolicyHandlerList> handlers( | 549 scoped_ptr<ConfigurationPolicyHandlerList> handlers( |
550 new ConfigurationPolicyHandlerList( | 550 new ConfigurationPolicyHandlerList( |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 chrome_schema, | 796 chrome_schema, |
797 SCHEMA_STRICT, | 797 SCHEMA_STRICT, |
798 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, | 798 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, |
799 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); | 799 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); |
800 #endif // defined(OS_CHROMEOS) | 800 #endif // defined(OS_CHROMEOS) |
801 | 801 |
802 return handlers.Pass(); | 802 return handlers.Pass(); |
803 } | 803 } |
804 | 804 |
805 } // namespace policy | 805 } // namespace policy |
OLD | NEW |