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

Side by Side Diff: ios/chrome/browser/sync/fake_sync_service_factory.cc

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/sync/fake_sync_service_factory.h" 5 #include "ios/chrome/browser/sync/fake_sync_service_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h"
8 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
9 #include "components/keyed_service/core/keyed_service.h" 10 #include "components/keyed_service/core/keyed_service.h"
10 #include "components/keyed_service/ios/browser_state_dependency_manager.h" 11 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
11 #include "components/sync_driver/fake_sync_service.h" 12 #include "components/sync_driver/fake_sync_service.h"
12 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
13 14
14 namespace { 15 namespace {
15 16
16 class KeyedFakeSyncService : public KeyedService { 17 class KeyedFakeSyncService : public KeyedService {
17 public: 18 public:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 ->fake_sync_service(); 54 ->fake_sync_service();
54 } 55 }
55 56
56 FakeSyncServiceFactory::FakeSyncServiceFactory() 57 FakeSyncServiceFactory::FakeSyncServiceFactory()
57 : BrowserStateKeyedServiceFactory( 58 : BrowserStateKeyedServiceFactory(
58 "FakeSyncService", 59 "FakeSyncService",
59 BrowserStateDependencyManager::GetInstance()) {} 60 BrowserStateDependencyManager::GetInstance()) {}
60 61
61 FakeSyncServiceFactory::~FakeSyncServiceFactory() {} 62 FakeSyncServiceFactory::~FakeSyncServiceFactory() {}
62 63
63 scoped_ptr<KeyedService> FakeSyncServiceFactory::BuildServiceInstanceFor( 64 std::unique_ptr<KeyedService> FakeSyncServiceFactory::BuildServiceInstanceFor(
64 web::BrowserState* context) const { 65 web::BrowserState* context) const {
65 return make_scoped_ptr(new KeyedFakeSyncService); 66 return base::WrapUnique(new KeyedFakeSyncService);
66 } 67 }
67 68
68 } // namespace ios 69 } // namespace ios
OLDNEW
« no previous file with comments | « ios/chrome/browser/sync/fake_sync_service_factory.h ('k') | ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698