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

Side by Side Diff: ios/public/provider/chrome/browser/signin/signin_error_provider.h

Issue 2121083004: Upstream ProfileOAuth2TokenServiceProviderImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_PROVIDER_H_ 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_PROVIDER_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_PROVIDER_H_ 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 @class NSError; 10 @class NSError;
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 SigninErrorProvider(); 41 SigninErrorProvider();
42 virtual ~SigninErrorProvider(); 42 virtual ~SigninErrorProvider();
43 43
44 // Returns what family an error belongs to. 44 // Returns what family an error belongs to.
45 virtual SigninErrorCategory GetErrorCategory(NSError* error); 45 virtual SigninErrorCategory GetErrorCategory(NSError* error);
46 46
47 // Tests if an NSError is user cancellation error. 47 // Tests if an NSError is user cancellation error.
48 virtual bool IsCanceled(NSError* error); 48 virtual bool IsCanceled(NSError* error);
49 49
50 // Tests if an NSError is an authorization forbidden error.
51 virtual bool IsForbidden(NSError* error);
52
53 // Tests if an NSError is a bad request error.
54 virtual bool IsBadRequest(NSError* error);
55
50 // Constant in JSON error responses to server requests indicating that 56 // Constant in JSON error responses to server requests indicating that
51 // the authentication was revoked by the server. 57 // the authentication was revoked by the server.
52 virtual NSString* GetInvalidGrantJsonErrorKey(); 58 virtual NSString* GetInvalidGrantJsonErrorKey();
53 59
54 // Gets the signin error domain. 60 // Gets the signin error domain.
55 virtual NSString* GetSigninErrorDomain(); 61 virtual NSString* GetSigninErrorDomain();
56 62
57 // Gets the error code corresponding to |error|. 63 // Gets the error code corresponding to |error|.
58 virtual int GetCode(SigninError error); 64 virtual int GetCode(SigninError error);
59 65
60 private: 66 private:
61 DISALLOW_COPY_AND_ASSIGN(SigninErrorProvider); 67 DISALLOW_COPY_AND_ASSIGN(SigninErrorProvider);
62 }; 68 };
63 69
64 } // namespace ios 70 } // namespace ios
65 71
66 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_PROVIDER_H_ 72 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698