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

Side by Side Diff: chrome/common/net/gaia/oauth2_mint_token_flow.h

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win bot happy Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/net/gaia/oauth2_access_token_consumer.h ('k') | chrome/common/pref_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ 5 #ifndef CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_
6 #define CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ 6 #define CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 std::string login_refresh_token; 82 std::string login_refresh_token;
83 std::string extension_id; 83 std::string extension_id;
84 std::string client_id; 84 std::string client_id;
85 std::vector<std::string> scopes; 85 std::vector<std::string> scopes;
86 Mode mode; 86 Mode mode;
87 }; 87 };
88 88
89 class Delegate { 89 class Delegate {
90 public: 90 public:
91 Delegate() {}
92 virtual ~Delegate() {}
93 virtual void OnMintTokenSuccess(const std::string& access_token) {} 91 virtual void OnMintTokenSuccess(const std::string& access_token) {}
94 virtual void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) {} 92 virtual void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) {}
95 virtual void OnMintTokenFailure(const GoogleServiceAuthError& error) {} 93 virtual void OnMintTokenFailure(const GoogleServiceAuthError& error) {}
94
95 protected:
96 virtual ~Delegate() {}
96 }; 97 };
97 98
98 // An interceptor for tests. 99 // An interceptor for tests.
99 class InterceptorForTests { 100 class InterceptorForTests {
100 public: 101 public:
101 // Returns true if the success callback should be called and false for 102 // Returns true if the success callback should be called and false for
102 // failures. 103 // failures.
103 virtual bool DoIntercept(const OAuth2MintTokenFlow* flow, 104 virtual bool DoIntercept(const OAuth2MintTokenFlow* flow,
104 std::string* access_token, 105 std::string* access_token,
105 GoogleServiceAuthError* error) = 0; 106 GoogleServiceAuthError* error) = 0;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 const base::DictionaryValue* dict, std::string* access_token); 147 const base::DictionaryValue* dict, std::string* access_token);
147 148
148 net::URLRequestContextGetter* context_; 149 net::URLRequestContextGetter* context_;
149 Delegate* delegate_; 150 Delegate* delegate_;
150 Parameters parameters_; 151 Parameters parameters_;
151 152
152 DISALLOW_COPY_AND_ASSIGN(OAuth2MintTokenFlow); 153 DISALLOW_COPY_AND_ASSIGN(OAuth2MintTokenFlow);
153 }; 154 };
154 155
155 #endif // CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_ 156 #endif // CHROME_COMMON_NET_GAIA_OAUTH2_MINT_TOKEN_FLOW_H_
OLDNEW
« no previous file with comments | « chrome/common/net/gaia/oauth2_access_token_consumer.h ('k') | chrome/common/pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698