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

Side by Side Diff: components/signin/core/browser/signin_client.h

Issue 226643012: Upstream iOS implementation of ProfileOAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 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
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 COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "components/signin/core/browser/webdata/token_web_data.h" 9 #include "components/signin/core/browser/webdata/token_web_data.h"
10 10
11 class PrefService; 11 class PrefService;
12 class SigninManagerBase; 12 class SigninManagerBase;
13 class TokenWebData; 13 class TokenWebData;
14 14
15 namespace net { 15 namespace net {
16 class CanonicalCookie; 16 class CanonicalCookie;
17 class URLRequestContextGetter; 17 class URLRequestContextGetter;
18 } 18 }
19 19
20 #if defined(OS_IOS)
21 namespace ios {
22 // TODO(msarda): http://crbug.com/358544 Remove this iOS specific code from the
23 // core SigninClient.
Roger Tawa OOO till Jul 10th 2014/04/10 15:04:08 Is this a bug you plan to fix soon? Can you put m
msarda 2014/04/10 15:13:36 No, this is low priority. It was something Colin w
blundell 2014/04/10 15:17:58 Ideally the client wouldn't have anything platform
24 class ProfileOAuth2TokenServiceIOSProvider;
25 }
26 #endif
27
20 // An interface that needs to be supplied to the Signin component by its 28 // An interface that needs to be supplied to the Signin component by its
21 // embedder. 29 // embedder.
22 class SigninClient { 30 class SigninClient {
23 public: 31 public:
24 typedef base::Callback<void(const net::CanonicalCookie* cookie)> 32 typedef base::Callback<void(const net::CanonicalCookie* cookie)>
25 CookieChangedCallback; 33 CookieChangedCallback;
26 34
27 virtual ~SigninClient() {} 35 virtual ~SigninClient() {}
28 36
29 // Gets the preferences associated with the client. 37 // Gets the preferences associated with the client.
(...skipping 20 matching lines...) Expand all
50 // callback will be called only if it is not empty. 58 // callback will be called only if it is not empty.
51 // TODO(blundell): Eliminate this interface in favor of having core signin 59 // TODO(blundell): Eliminate this interface in favor of having core signin
52 // code observe cookie changes once //chrome/browser/net has been 60 // code observe cookie changes once //chrome/browser/net has been
53 // componentized. 61 // componentized.
54 virtual void SetCookieChangedCallback( 62 virtual void SetCookieChangedCallback(
55 const CookieChangedCallback& callback) = 0; 63 const CookieChangedCallback& callback) = 0;
56 64
57 // Called when Google signin has succeeded. 65 // Called when Google signin has succeeded.
58 virtual void GoogleSigninSucceeded(const std::string& username, 66 virtual void GoogleSigninSucceeded(const std::string& username,
59 const std::string& password) {} 67 const std::string& password) {}
68
69 #if defined(OS_IOS)
70 // TODO(msarda): http://crbug.com/358544 Remove this iOS specific code from
71 // the core SigninClient.
72 virtual ios::ProfileOAuth2TokenServiceIOSProvider* GetIOSProvider() = 0;
73 #endif
60 }; 74 };
61 75
62 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_ 76 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698