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

Side by Side Diff: google_apis/gaia/ubertoken_fetcher.h

Issue 2757873002: Change SigninClient::CreateGaiaAuthFetcher return type to unique_ptr (Closed)
Patch Set: Created 3 years, 9 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_UBERTOKEN_FETCHER_H_ 5 #ifndef GOOGLE_APIS_GAIA_UBERTOKEN_FETCHER_H_
6 #define GOOGLE_APIS_GAIA_UBERTOKEN_FETCHER_H_ 6 #define GOOGLE_APIS_GAIA_UBERTOKEN_FETCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 // 21 //
22 // This class can handle one request at a time. 22 // This class can handle one request at a time.
23 23
24 class GaiaAuthFetcher; 24 class GaiaAuthFetcher;
25 class GoogleServiceAuthError; 25 class GoogleServiceAuthError;
26 26
27 namespace net { 27 namespace net {
28 class URLRequestContextGetter; 28 class URLRequestContextGetter;
29 } 29 }
30 30
31 typedef base::Callback<GaiaAuthFetcher*(GaiaAuthConsumer*, 31 using GaiaAuthFetcherFactory = base::Callback<std::unique_ptr<GaiaAuthFetcher>(
32 const std::string&, 32 GaiaAuthConsumer*,
33 net::URLRequestContextGetter*)> 33 const std::string&,
34 GaiaAuthFetcherFactory; 34 net::URLRequestContextGetter*)>;
35 35
36 // Callback for the |UbertokenFetcher| class. 36 // Callback for the |UbertokenFetcher| class.
37 class UbertokenConsumer { 37 class UbertokenConsumer {
38 public: 38 public:
39 UbertokenConsumer() {} 39 UbertokenConsumer() {}
40 virtual ~UbertokenConsumer() {} 40 virtual ~UbertokenConsumer() {}
41 virtual void OnUbertokenSuccess(const std::string& token) {} 41 virtual void OnUbertokenSuccess(const std::string& token) {}
42 virtual void OnUbertokenFailure(const GoogleServiceAuthError& error) {} 42 virtual void OnUbertokenFailure(const GoogleServiceAuthError& error) {}
43 }; 43 };
44 44
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 std::string account_id_; 93 std::string account_id_;
94 std::string access_token_; 94 std::string access_token_;
95 int retry_number_; 95 int retry_number_;
96 base::OneShotTimer retry_timer_; 96 base::OneShotTimer retry_timer_;
97 bool second_access_token_request_; 97 bool second_access_token_request_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(UbertokenFetcher); 99 DISALLOW_COPY_AND_ASSIGN(UbertokenFetcher);
100 }; 100 };
101 101
102 #endif // GOOGLE_APIS_GAIA_UBERTOKEN_FETCHER_H_ 102 #endif // GOOGLE_APIS_GAIA_UBERTOKEN_FETCHER_H_
OLDNEW
« no previous file with comments | « components/signin/core/browser/test_signin_client.cc ('k') | google_apis/gaia/ubertoken_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698