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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_external_data_manager.cc

Issue 2257103002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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/chromeos/policy/user_cloud_external_data_manager.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_external_data_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 14 matching lines...) Expand all
25 const GetChromePolicyDetailsCallback& get_policy_details, 25 const GetChromePolicyDetailsCallback& get_policy_details,
26 scoped_refptr<base::SequencedTaskRunner> backend_task_runner, 26 scoped_refptr<base::SequencedTaskRunner> backend_task_runner,
27 scoped_refptr<base::SequencedTaskRunner> io_task_runner, 27 scoped_refptr<base::SequencedTaskRunner> io_task_runner,
28 const base::FilePath& cache_path, 28 const base::FilePath& cache_path,
29 CloudPolicyStore* policy_store) 29 CloudPolicyStore* policy_store)
30 : CloudExternalDataManagerBase(get_policy_details, 30 : CloudExternalDataManagerBase(get_policy_details,
31 backend_task_runner, 31 backend_task_runner,
32 io_task_runner), 32 io_task_runner),
33 resource_cache_(new ResourceCache(cache_path, backend_task_runner)) { 33 resource_cache_(new ResourceCache(cache_path, backend_task_runner)) {
34 SetPolicyStore(policy_store); 34 SetPolicyStore(policy_store);
35 SetExternalDataStore(base::WrapUnique(new CloudExternalDataStore( 35 SetExternalDataStore(base::MakeUnique<CloudExternalDataStore>(
36 kCacheKey, backend_task_runner, resource_cache_))); 36 kCacheKey, backend_task_runner, resource_cache_));
37 } 37 }
38 38
39 UserCloudExternalDataManager::~UserCloudExternalDataManager() { 39 UserCloudExternalDataManager::~UserCloudExternalDataManager() {
40 SetExternalDataStore(std::unique_ptr<CloudExternalDataStore>()); 40 SetExternalDataStore(std::unique_ptr<CloudExternalDataStore>());
41 backend_task_runner_->DeleteSoon(FROM_HERE, resource_cache_); 41 backend_task_runner_->DeleteSoon(FROM_HERE, resource_cache_);
42 } 42 }
43 43
44 } // namespace policy 44 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698