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

Side by Side Diff: google_apis/gaia/oauth2_access_token_fetcher_impl.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_IMPL_H_ 5 #ifndef GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_IMPL_H_
6 #define GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_IMPL_H_ 6 #define GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_IMPL_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "google_apis/gaia/oauth2_access_token_consumer.h" 14 #include "google_apis/gaia/oauth2_access_token_consumer.h"
15 #include "google_apis/gaia/oauth2_access_token_fetcher.h" 15 #include "google_apis/gaia/oauth2_access_token_fetcher.h"
16 #include "net/url_request/url_fetcher_delegate.h" 16 #include "net/url_request/url_fetcher_delegate.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 class OAuth2AccessTokenFetcherImplTest; 19 class OAuth2AccessTokenFetcherImplTest;
20 20
21 namespace base { 21 namespace base {
22 class Time; 22 class Time;
23 } 23 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 static bool ParseGetAccessTokenFailureResponse(const net::URLFetcher* source, 96 static bool ParseGetAccessTokenFailureResponse(const net::URLFetcher* source,
97 std::string* error); 97 std::string* error);
98 98
99 // State that is set during construction. 99 // State that is set during construction.
100 net::URLRequestContextGetter* const getter_; 100 net::URLRequestContextGetter* const getter_;
101 std::string refresh_token_; 101 std::string refresh_token_;
102 State state_; 102 State state_;
103 103
104 // While a fetch is in progress. 104 // While a fetch is in progress.
105 scoped_ptr<net::URLFetcher> fetcher_; 105 std::unique_ptr<net::URLFetcher> fetcher_;
106 std::string client_id_; 106 std::string client_id_;
107 std::string client_secret_; 107 std::string client_secret_;
108 std::vector<std::string> scopes_; 108 std::vector<std::string> scopes_;
109 109
110 friend class OAuth2AccessTokenFetcherImplTest; 110 friend class OAuth2AccessTokenFetcherImplTest;
111 FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherImplTest, 111 FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherImplTest,
112 ParseGetAccessTokenResponse); 112 ParseGetAccessTokenResponse);
113 FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherImplTest, 113 FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherImplTest,
114 MakeGetAccessTokenBody); 114 MakeGetAccessTokenBody);
115 115
116 DISALLOW_COPY_AND_ASSIGN(OAuth2AccessTokenFetcherImpl); 116 DISALLOW_COPY_AND_ASSIGN(OAuth2AccessTokenFetcherImpl);
117 }; 117 };
118 118
119 #endif // GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_IMPL_H_ 119 #endif // GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698