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

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

Issue 649283003: Standardize usage of virtual/override/final in google_apis/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_API_CALL_FLOW_H_ 5 #ifndef GOOGLE_APIS_GAIA_OAUTH2_API_CALL_FLOW_H_
6 #define GOOGLE_APIS_GAIA_OAUTH2_API_CALL_FLOW_H_ 6 #define GOOGLE_APIS_GAIA_OAUTH2_API_CALL_FLOW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 14 matching lines...) Expand all
25 // Base class for all classes that implement a flow to call OAuth2 enabled APIs, 25 // Base class for all classes that implement a flow to call OAuth2 enabled APIs,
26 // given an access token to the service. This class abstracts the basic steps 26 // given an access token to the service. This class abstracts the basic steps
27 // and exposes template methods for sub-classes to implement for API specific 27 // and exposes template methods for sub-classes to implement for API specific
28 // details. 28 // details.
29 class OAuth2ApiCallFlow 29 class OAuth2ApiCallFlow
30 : public net::URLFetcherDelegate, 30 : public net::URLFetcherDelegate,
31 public OAuth2AccessTokenConsumer { 31 public OAuth2AccessTokenConsumer {
32 public: 32 public:
33 OAuth2ApiCallFlow(); 33 OAuth2ApiCallFlow();
34 34
35 virtual ~OAuth2ApiCallFlow(); 35 ~OAuth2ApiCallFlow() override;
36 36
37 // Start the flow. 37 // Start the flow.
38 virtual void Start(net::URLRequestContextGetter* context, 38 virtual void Start(net::URLRequestContextGetter* context,
39 const std::string& access_token); 39 const std::string& access_token);
40 40
41 // net::URLFetcherDelegate implementation. 41 // net::URLFetcherDelegate implementation.
42 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; 42 void OnURLFetchComplete(const net::URLFetcher* source) override;
43 43
44 protected: 44 protected:
45 // Template methods for sub-classes. 45 // Template methods for sub-classes.
46 46
47 // Methods to help create the API request. 47 // Methods to help create the API request.
48 virtual GURL CreateApiCallUrl() = 0; 48 virtual GURL CreateApiCallUrl() = 0;
49 virtual std::string CreateApiCallBody() = 0; 49 virtual std::string CreateApiCallBody() = 0;
50 virtual std::string CreateApiCallBodyContentType(); 50 virtual std::string CreateApiCallBodyContentType();
51 51
52 // Sub-classes can expose an appropriate observer interface by implementing 52 // Sub-classes can expose an appropriate observer interface by implementing
(...skipping 23 matching lines...) Expand all
76 void BeginApiCall(); 76 void BeginApiCall();
77 void EndApiCall(const net::URLFetcher* source); 77 void EndApiCall(const net::URLFetcher* source);
78 78
79 State state_; 79 State state_;
80 scoped_ptr<net::URLFetcher> url_fetcher_; 80 scoped_ptr<net::URLFetcher> url_fetcher_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(OAuth2ApiCallFlow); 82 DISALLOW_COPY_AND_ASSIGN(OAuth2ApiCallFlow);
83 }; 83 };
84 84
85 #endif // GOOGLE_APIS_GAIA_OAUTH2_API_CALL_FLOW_H_ 85 #endif // GOOGLE_APIS_GAIA_OAUTH2_API_CALL_FLOW_H_
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_access_token_fetcher_impl.h ('k') | google_apis/gaia/oauth2_mint_token_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698