| 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 #if !defined(OS_IOS) | 31 #if !defined(OS_IOS) |
| 32 #include "chrome/browser/net/disk_cache_dir_policy_handler.h" | 32 #include "chrome/browser/net/disk_cache_dir_policy_handler.h" |
| 33 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h" | 33 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h" |
| 34 #include "chrome/browser/policy/javascript_policy_handler.h" | 34 #include "chrome/browser/policy/javascript_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.h" | |
| 42 #include "chrome/browser/chromeos/login/users/user_manager.h" | 41 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 43 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h
" | 42 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h
" |
| 44 #include "chromeos/dbus/power_policy_controller.h" | 43 #include "chromeos/dbus/power_policy_controller.h" |
| 44 #include "components/user_manager/user.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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 scoped_ptr<base::Value>(new base::StringValue( | 526 scoped_ptr<base::Value>(new base::StringValue( |
| 527 switches::kEnableShowModalDialog)))); | 527 switches::kEnableShowModalDialog)))); |
| 528 } | 528 } |
| 529 #endif // !defined(OS_IOS) | 529 #endif // !defined(OS_IOS) |
| 530 | 530 |
| 531 } // namespace | 531 } // namespace |
| 532 | 532 |
| 533 void PopulatePolicyHandlerParameters(PolicyHandlerParameters* parameters) { | 533 void PopulatePolicyHandlerParameters(PolicyHandlerParameters* parameters) { |
| 534 #if defined(OS_CHROMEOS) | 534 #if defined(OS_CHROMEOS) |
| 535 if (chromeos::UserManager::IsInitialized()) { | 535 if (chromeos::UserManager::IsInitialized()) { |
| 536 const chromeos::User* user = chromeos::UserManager::Get()->GetActiveUser(); | 536 const user_manager::User* user = |
| 537 chromeos::UserManager::Get()->GetActiveUser(); |
| 537 if (user) | 538 if (user) |
| 538 parameters->user_id_hash = user->username_hash(); | 539 parameters->user_id_hash = user->username_hash(); |
| 539 } | 540 } |
| 540 #endif | 541 #endif |
| 541 } | 542 } |
| 542 | 543 |
| 543 scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList( | 544 scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList( |
| 544 const Schema& chrome_schema) { | 545 const Schema& chrome_schema) { |
| 545 scoped_ptr<ConfigurationPolicyHandlerList> handlers( | 546 scoped_ptr<ConfigurationPolicyHandlerList> handlers( |
| 546 new ConfigurationPolicyHandlerList( | 547 new ConfigurationPolicyHandlerList( |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( | 783 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( |
| 783 new ExternalDataPolicyHandler(key::kUserAvatarImage))); | 784 new ExternalDataPolicyHandler(key::kUserAvatarImage))); |
| 784 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( | 785 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( |
| 785 new ExternalDataPolicyHandler(key::kWallpaperImage))); | 786 new ExternalDataPolicyHandler(key::kWallpaperImage))); |
| 786 #endif // defined(OS_CHROMEOS) | 787 #endif // defined(OS_CHROMEOS) |
| 787 | 788 |
| 788 return handlers.Pass(); | 789 return handlers.Pass(); |
| 789 } | 790 } |
| 790 | 791 |
| 791 } // namespace policy | 792 } // namespace policy |
| OLD | NEW |