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

Side by Side Diff: chrome/browser/signin/oauth2_token_service_test_util.h

Issue 15906011: Use a direct include of strings headers in chrome/browser/r*-s*/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_TEST_UTIL_H_
6 #define CHROME_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_TEST_UTIL_H_ 6 #define CHROME_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_TEST_UTIL_H_
7 7
8 #include "chrome/browser/signin/oauth2_token_service.h" 8 #include "chrome/browser/signin/oauth2_token_service.h"
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "google_apis/gaia/google_service_auth_error.h" 13 #include "google_apis/gaia/google_service_auth_error.h"
14 14
15 extern const char kValidTokenResponse[]; 15 extern const char kValidTokenResponse[];
16 16
17 std::string GetValidTokenResponse(std::string token, int expiration); 17 std::string GetValidTokenResponse(std::string token, int expiration);
18 18
19 // A simple testing consumer. 19 // A simple testing consumer.
20 class TestingOAuth2TokenServiceConsumer : public OAuth2TokenService::Consumer { 20 class TestingOAuth2TokenServiceConsumer : public OAuth2TokenService::Consumer {
21 public: 21 public:
22 TestingOAuth2TokenServiceConsumer(); 22 TestingOAuth2TokenServiceConsumer();
23 virtual ~TestingOAuth2TokenServiceConsumer(); 23 virtual ~TestingOAuth2TokenServiceConsumer();
24 24
25 // OAuth2TokenService::Consumer overrides. 25 // OAuth2TokenService::Consumer overrides.
26 virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, 26 virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
27 const std::string& token, 27 const std::string& token,
28 const base::Time& expiration_date) OVERRIDE; 28 const base::Time& expiration_date) OVERRIDE;
29 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, 29 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request,
30 const GoogleServiceAuthError& error) OVERRIDE; 30 const GoogleServiceAuthError& error) OVERRIDE;
31 31
32 std::string last_token_; 32 std::string last_token_;
33 int number_of_successful_tokens_; 33 int number_of_successful_tokens_;
34 GoogleServiceAuthError last_error_; 34 GoogleServiceAuthError last_error_;
35 int number_of_errors_; 35 int number_of_errors_;
36 }; 36 };
37 37
38 #endif // CHROME_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_TEST_UTIL_H_ 38 #endif // CHROME_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_win_unittest.cc ('k') | chrome/browser/signin/oauth2_token_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698