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

Unified Diff: extensions/shell/browser/shell_oauth2_token_service.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: extensions/shell/browser/shell_oauth2_token_service.cc
diff --git a/extensions/shell/browser/shell_oauth2_token_service.cc b/extensions/shell/browser/shell_oauth2_token_service.cc
index b2a7c4ccebe1efa5ca9b3a919b2119684ac5b4d9..aca14493b4ccbba5dde65c17fee3d3f3044538de 100644
--- a/extensions/shell/browser/shell_oauth2_token_service.cc
+++ b/extensions/shell/browser/shell_oauth2_token_service.cc
@@ -5,6 +5,7 @@
#include "extensions/shell/browser/shell_oauth2_token_service.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/shell/browser/shell_oauth2_token_service_delegate.h"
@@ -20,9 +21,10 @@ ShellOAuth2TokenService::ShellOAuth2TokenService(
content::BrowserContext* browser_context,
std::string account_id,
std::string refresh_token)
- : OAuth2TokenService(new ShellOAuth2TokenServiceDelegate(browser_context,
- account_id,
- refresh_token)) {
+ : OAuth2TokenService(
+ base::MakeUnique<ShellOAuth2TokenServiceDelegate>(browser_context,
+ account_id,
+ refresh_token)) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(!g_instance);
g_instance = this;

Powered by Google App Engine
This is Rietveld 408576698