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

Unified Diff: ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc
diff --git a/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc b/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc
index 6f176efed5c8ab063769a2558af3b05c0bd23af4..abe148c203262355df0d8991b94d1f0454b14f48 100644
--- a/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc
+++ b/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc
@@ -4,6 +4,7 @@
#include "ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/threading/sequenced_worker_pool.h"
@@ -41,7 +42,7 @@ IOSChromeGCMProfileServiceFactory::IOSChromeGCMProfileServiceFactory()
IOSChromeGCMProfileServiceFactory::~IOSChromeGCMProfileServiceFactory() {}
-scoped_ptr<KeyedService>
+std::unique_ptr<KeyedService>
IOSChromeGCMProfileServiceFactory::BuildServiceInstanceFor(
web::BrowserState* context) const {
DCHECK(!context->IsOffTheRecord());
@@ -53,14 +54,14 @@ IOSChromeGCMProfileServiceFactory::BuildServiceInstanceFor(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
ios::ChromeBrowserState* browser_state =
ios::ChromeBrowserState::FromBrowserState(context);
- return make_scoped_ptr(new gcm::GCMProfileService(
+ return base::WrapUnique(new gcm::GCMProfileService(
browser_state->GetPrefs(), browser_state->GetStatePath(),
browser_state->GetRequestContext(), ::GetChannel(),
- make_scoped_ptr(new ProfileIdentityProvider(
+ base::WrapUnique(new ProfileIdentityProvider(
ios::SigninManagerFactory::GetForBrowserState(browser_state),
OAuth2TokenServiceFactory::GetForBrowserState(browser_state),
base::Closure())),
- make_scoped_ptr(new gcm::GCMClientFactory),
+ base::WrapUnique(new gcm::GCMClientFactory),
web::WebThread::GetTaskRunnerForThread(web::WebThread::UI),
web::WebThread::GetTaskRunnerForThread(web::WebThread::IO),
blocking_task_runner));

Powered by Google App Engine
This is Rietveld 408576698