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

Side by Side Diff: remoting/host/gaia_user_email_fetcher.h

Issue 11273024: Remove GaiaOauthClient and GaiaUserEmailFetcher from remoting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « remoting/host/gaia_oauth_client.cc ('k') | remoting/host/gaia_user_email_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_GAIA_USER_EMAIL_FETCHER_H_
6 #define REMOTING_HOST_GAIA_USER_EMAIL_FETCHER_H_
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
11 #include "base/message_loop_proxy.h"
12
13 namespace net {
14 class URLRequestContextGetter;
15 } // namespace net
16
17 // A helper class to get a user's email, given an OAuth access token.
18 // TODO(simonmorris): Consider moving this to google_apis/gaia.
19 namespace remoting {
20
21 class GaiaUserEmailFetcher {
22 public:
23 class Delegate {
24 public:
25 virtual ~Delegate() { }
26
27 // Invoked on a successful response to the GetUserEmail request.
28 virtual void OnGetUserEmailResponse(const std::string& user_email) = 0;
29 // Invoked when there is a network error or upon receiving an
30 // invalid response.
31 virtual void OnNetworkError(int response_code) = 0;
32 };
33
34 GaiaUserEmailFetcher(net::URLRequestContextGetter* context_getter);
35 ~GaiaUserEmailFetcher();
36
37 void GetUserEmail(const std::string& oauth_access_token,
38 Delegate* delegate);
39
40 private:
41 // The guts of the implementation live in this class.
42 class Core;
43 scoped_refptr<Core> core_;
44 DISALLOW_COPY_AND_ASSIGN(GaiaUserEmailFetcher);
45 };
46
47 } // namespace remoting
48
49 #endif // REMOTING_HOST_GAIA_USER_EMAIL_FETCHER_H_
OLDNEW
« no previous file with comments | « remoting/host/gaia_oauth_client.cc ('k') | remoting/host/gaia_user_email_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698