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

Unified Diff: google_apis/gaia/oauth2_token_service.h

Issue 1873663002: Convert //google_apis from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: google_apis/gaia/oauth2_token_service.h
diff --git a/google_apis/gaia/oauth2_token_service.h b/google_apis/gaia/oauth2_token_service.h
index 41ca7256f3b5dcb9c2a7e850eb0463871acfab3d..c52bb3b70ade360d667d1f090ae1586e01e511e7 100644
--- a/google_apis/gaia/oauth2_token_service.h
+++ b/google_apis/gaia/oauth2_token_service.h
@@ -8,12 +8,12 @@
#include <stddef.h>
#include <map>
+#include <memory>
#include <set>
#include <string>
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/threading/non_thread_safe.h"
@@ -150,14 +150,14 @@ class OAuth2TokenService : public base::NonThreadSafe {
// |scopes| is the set of scopes to get an access token for, |consumer| is
// the object that will be called back with results if the returned request
// is not deleted. Virtual for mocking.
- virtual scoped_ptr<Request> StartRequest(const std::string& account_id,
- const ScopeSet& scopes,
- Consumer* consumer);
+ virtual std::unique_ptr<Request> StartRequest(const std::string& account_id,
+ const ScopeSet& scopes,
+ Consumer* consumer);
// This method does the same as |StartRequest| except it uses |client_id| and
// |client_secret| to identify OAuth client app instead of using
// Chrome's default values.
- scoped_ptr<Request> StartRequestForClient(
+ std::unique_ptr<Request> StartRequestForClient(
const std::string& account_id,
const std::string& client_id,
const std::string& client_secret,
@@ -167,7 +167,7 @@ class OAuth2TokenService : public base::NonThreadSafe {
// This method does the same as |StartRequest| except it uses the request
// context given by |getter| instead of using the one returned by
// |GetRequestContext| implemented by derived classes.
- scoped_ptr<Request> StartRequestWithContext(
+ std::unique_ptr<Request> StartRequestWithContext(
const std::string& account_id,
net::URLRequestContextGetter* getter,
const ScopeSet& scopes,
@@ -325,7 +325,7 @@ class OAuth2TokenService : public base::NonThreadSafe {
// This method does the same as |StartRequestWithContext| except it
// uses |client_id| and |client_secret| to identify OAuth
// client app instead of using Chrome's default values.
- scoped_ptr<Request> StartRequestForClientWithContext(
+ std::unique_ptr<Request> StartRequestForClientWithContext(
const std::string& account_id,
net::URLRequestContextGetter* getter,
const std::string& client_id,
@@ -364,7 +364,7 @@ class OAuth2TokenService : public base::NonThreadSafe {
typedef std::map<RequestParameters, CacheEntry> TokenCache;
TokenCache token_cache_;
- scoped_ptr<OAuth2TokenServiceDelegate> delegate_;
+ std::unique_ptr<OAuth2TokenServiceDelegate> delegate_;
// A map from fetch parameters to a fetcher that is fetching an OAuth2 access
// token using these parameters.

Powered by Google App Engine
This is Rietveld 408576698