| Index: chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
|
| diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
|
| index a9c854686731ff49bd91faa35d82a1291c80339d..cf85e4f4e200a7697881dedcbb22c1a50ae6c658 100644
|
| --- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
|
| +++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
|
| @@ -86,11 +86,11 @@ UserCloudPolicyManagerChromeOS*
|
| }
|
|
|
| // static
|
| -scoped_ptr<UserCloudPolicyManagerChromeOS>
|
| - UserCloudPolicyManagerFactoryChromeOS::CreateForProfile(
|
| - Profile* profile,
|
| - bool force_immediate_load,
|
| - scoped_refptr<base::SequencedTaskRunner> background_task_runner) {
|
| +std::unique_ptr<UserCloudPolicyManagerChromeOS>
|
| +UserCloudPolicyManagerFactoryChromeOS::CreateForProfile(
|
| + Profile* profile,
|
| + bool force_immediate_load,
|
| + scoped_refptr<base::SequencedTaskRunner> background_task_runner) {
|
| return GetInstance()->CreateManagerForProfile(
|
| profile, force_immediate_load, background_task_runner);
|
| }
|
| @@ -114,16 +114,16 @@ UserCloudPolicyManagerChromeOS*
|
| return it != managers_.end() ? it->second : NULL;
|
| }
|
|
|
| -scoped_ptr<UserCloudPolicyManagerChromeOS>
|
| - UserCloudPolicyManagerFactoryChromeOS::CreateManagerForProfile(
|
| - Profile* profile,
|
| - bool force_immediate_load,
|
| - scoped_refptr<base::SequencedTaskRunner> background_task_runner) {
|
| +std::unique_ptr<UserCloudPolicyManagerChromeOS>
|
| +UserCloudPolicyManagerFactoryChromeOS::CreateManagerForProfile(
|
| + Profile* profile,
|
| + bool force_immediate_load,
|
| + scoped_refptr<base::SequencedTaskRunner> background_task_runner) {
|
| const base::CommandLine* command_line =
|
| base::CommandLine::ForCurrentProcess();
|
| // Don't initialize cloud policy for the signin profile.
|
| if (chromeos::ProfileHelper::IsSigninProfile(profile))
|
| - return scoped_ptr<UserCloudPolicyManagerChromeOS>();
|
| + return std::unique_ptr<UserCloudPolicyManagerChromeOS>();
|
|
|
| // |user| should never be NULL except for the signin profile. This object is
|
| // created as part of the Profile creation, which happens right after
|
| @@ -141,7 +141,7 @@ scoped_ptr<UserCloudPolicyManagerChromeOS>
|
| const AccountId account_id = user->GetAccountId();
|
| if (!user->HasGaiaAccount() || user->IsSupervised() ||
|
| BrowserPolicyConnector::IsNonEnterpriseUser(account_id.GetUserEmail())) {
|
| - return scoped_ptr<UserCloudPolicyManagerChromeOS>();
|
| + return std::unique_ptr<UserCloudPolicyManagerChromeOS>();
|
| }
|
|
|
| policy::BrowserPolicyConnectorChromeOS* connector =
|
| @@ -190,7 +190,7 @@ scoped_ptr<UserCloudPolicyManagerChromeOS>
|
| base::FilePath policy_key_dir;
|
| CHECK(PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &policy_key_dir));
|
|
|
| - scoped_ptr<UserCloudPolicyStoreChromeOS> store(
|
| + std::unique_ptr<UserCloudPolicyStoreChromeOS> store(
|
| new UserCloudPolicyStoreChromeOS(
|
| chromeos::DBusThreadManager::Get()->GetCryptohomeClient(),
|
| chromeos::DBusThreadManager::Get()->GetSessionManagerClient(),
|
| @@ -203,12 +203,10 @@ scoped_ptr<UserCloudPolicyManagerChromeOS>
|
| scoped_refptr<base::SequencedTaskRunner> io_task_runner =
|
| content::BrowserThread::GetMessageLoopProxyForThread(
|
| content::BrowserThread::IO);
|
| - scoped_ptr<CloudExternalDataManager> external_data_manager(
|
| + std::unique_ptr<CloudExternalDataManager> external_data_manager(
|
| new UserCloudExternalDataManager(base::Bind(&GetChromePolicyDetails),
|
| - backend_task_runner,
|
| - io_task_runner,
|
| - external_data_dir,
|
| - store.get()));
|
| + backend_task_runner, io_task_runner,
|
| + external_data_dir, store.get()));
|
| if (force_immediate_load)
|
| store->LoadImmediately();
|
|
|
| @@ -216,7 +214,7 @@ scoped_ptr<UserCloudPolicyManagerChromeOS>
|
| content::BrowserThread::GetMessageLoopProxyForThread(
|
| content::BrowserThread::FILE);
|
|
|
| - scoped_ptr<UserCloudPolicyManagerChromeOS> manager(
|
| + std::unique_ptr<UserCloudPolicyManagerChromeOS> manager(
|
| new UserCloudPolicyManagerChromeOS(
|
| std::move(store), std::move(external_data_manager),
|
| component_policy_cache_dir, wait_for_policy_fetch,
|
|
|