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

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

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: similarity Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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
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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 "ShowModalDialog_EffectiveUntil20150430", 525 "ShowModalDialog_EffectiveUntil20150430",
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 (user_manager::UserManager::IsInitialized()) {
536 const user_manager::User* user = 536 const user_manager::User* user =
537 chromeos::UserManager::Get()->GetActiveUser(); 537 user_manager::UserManager::Get()->GetActiveUser();
538 if (user) 538 if (user)
539 parameters->user_id_hash = user->username_hash(); 539 parameters->user_id_hash = user->username_hash();
540 } 540 }
541 #endif 541 #endif
542 } 542 }
543 543
544 scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList( 544 scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList(
545 const Schema& chrome_schema) { 545 const Schema& chrome_schema) {
546 scoped_ptr<ConfigurationPolicyHandlerList> handlers( 546 scoped_ptr<ConfigurationPolicyHandlerList> handlers(
547 new ConfigurationPolicyHandlerList( 547 new ConfigurationPolicyHandlerList(
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 chrome_schema, 793 chrome_schema,
794 SCHEMA_STRICT, 794 SCHEMA_STRICT,
795 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, 795 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED,
796 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); 796 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED)));
797 #endif // defined(OS_CHROMEOS) 797 #endif // defined(OS_CHROMEOS)
798 798
799 return handlers.Pass(); 799 return handlers.Pass();
800 } 800 }
801 801
802 } // namespace policy 802 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698