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

Unified Diff: chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc

Issue 2685123002: Make OAuth2TokenService and subclasses take delegate by unique_ptr (Closed)
Patch Set: Created 3 years, 10 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: chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc
diff --git a/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc b/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc
index 5d6ae0bc38d6b4028b7181e15f55dc26343e1e35..80d67216a6df109cf70ce3a1847dbff6558e9b8d 100644
--- a/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc
+++ b/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h"
+#include "base/memory/ptr_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
#include "chrome/browser/chromeos/settings/device_oauth2_token_service_delegate.h"
@@ -29,8 +30,8 @@ DeviceOAuth2TokenService* DeviceOAuth2TokenServiceFactory::Get() {
void DeviceOAuth2TokenServiceFactory::Initialize() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(!g_device_oauth2_token_service_);
- g_device_oauth2_token_service_ =
- new DeviceOAuth2TokenService(new DeviceOAuth2TokenServiceDelegate(
+ g_device_oauth2_token_service_ = new DeviceOAuth2TokenService(
+ base::MakeUnique<DeviceOAuth2TokenServiceDelegate>(
g_browser_process->system_request_context(),
g_browser_process->local_state()));
}

Powered by Google App Engine
This is Rietveld 408576698