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

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

Issue 6894027: Initial refactoring complete Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed some tests that were broken by previous refactoring Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/net/gaia/authentication_consumer.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) 2011 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 CHROME_COMMON_NET_GAIA_AUTHENTICATION_CONSUMER_H_
6 #define CHROME_COMMON_NET_GAIA_AUTHENTICATION_CONSUMER_H_
7 #pragma once
8
9 #include <string>
10
11 class GoogleServiceAuthError;
12
13 // An interface that defines the callbacks for objects that
14 // GaiaAuthFetcher can return data to.
15 class AuthenticationConsumer {
16 public:
17 struct AuthenticationResult {
18 public:
19 ~AuthenticationResult();
20
21 virtual bool IsValid() const = 0;
22
23 protected:
24 AuthenticationResult();
25
26 private:
27 bool operator==(const AuthenticationResult &b) const;
28 };
29
30 virtual ~AuthenticationConsumer() {}
31
32 virtual void OnAuthenticationSuccess(const AuthenticationResult& result) {}
33 virtual void OnAuthenticationFailure(const GoogleServiceAuthError& error) {}
34
35 virtual void OnIssueTokenSuccess(const std::string& service,
36 const std::string& auth_token) {}
37 virtual void OnIssueTokenFailure(const std::string& service,
38 const GoogleServiceAuthError& error) {}
39
40 virtual void OnGetUserInfoSuccess(const std::string& key,
41 const std::string& value) {}
42 virtual void OnGetUserInfoKeyNotFound(const std::string& key) {}
43 virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error) {}
44 };
45
46 #endif // CHROME_COMMON_NET_GAIA_AUTHENTICATION_CONSUMER_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/net/gaia/authentication_consumer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698