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

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

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 scoped_ptr<base::Value>(new base::StringValue( 521 scoped_ptr<base::Value>(new base::StringValue(
522 switches::kEnableShowModalDialog)))); 522 switches::kEnableShowModalDialog))));
523 } 523 }
524 #endif // !defined(OS_IOS) 524 #endif // !defined(OS_IOS)
525 525
526 } // namespace 526 } // namespace
527 527
528 void PopulatePolicyHandlerParameters(PolicyHandlerParameters* parameters) { 528 void PopulatePolicyHandlerParameters(PolicyHandlerParameters* parameters) {
529 #if defined(OS_CHROMEOS) 529 #if defined(OS_CHROMEOS)
530 if (chromeos::UserManager::IsInitialized()) { 530 if (chromeos::UserManager::IsInitialized()) {
531 const chromeos::User* user = chromeos::UserManager::Get()->GetActiveUser(); 531 const chromeos::User* user = chromeos::GetUserManager()->GetActiveUser();
532 if (user) 532 if (user)
533 parameters->user_id_hash = user->username_hash(); 533 parameters->user_id_hash = user->username_hash();
534 } 534 }
535 #endif 535 #endif
536 } 536 }
537 537
538 scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList( 538 scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList(
539 const Schema& chrome_schema) { 539 const Schema& chrome_schema) {
540 scoped_ptr<ConfigurationPolicyHandlerList> handlers( 540 scoped_ptr<ConfigurationPolicyHandlerList> handlers(
541 new ConfigurationPolicyHandlerList( 541 new ConfigurationPolicyHandlerList(
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( 774 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
775 new ExternalDataPolicyHandler(key::kUserAvatarImage))); 775 new ExternalDataPolicyHandler(key::kUserAvatarImage)));
776 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( 776 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
777 new ExternalDataPolicyHandler(key::kWallpaperImage))); 777 new ExternalDataPolicyHandler(key::kWallpaperImage)));
778 #endif // defined(OS_CHROMEOS) 778 #endif // defined(OS_CHROMEOS)
779 779
780 return handlers.Pass(); 780 return handlers.Pass();
781 } 781 }
782 782
783 } // namespace policy 783 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698