| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 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 CONTENT_BROWSER_GEOLOCATION_FAKE_ACCESS_TOKEN_STORE_H_ | |
| 6 #define CONTENT_BROWSER_GEOLOCATION_FAKE_ACCESS_TOKEN_STORE_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "content/browser/geolocation/access_token_store.h" | |
| 10 #include "testing/gtest/include/gtest/gtest.h" | |
| 11 | |
| 12 // A fake (non-persisted) access token store instance useful for testing. | |
| 13 class FakeAccessTokenStore : public AccessTokenStore { | |
| 14 public: | |
| 15 FakeAccessTokenStore(); | |
| 16 | |
| 17 void NotifyDelegateTokensLoaded(); | |
| 18 | |
| 19 // AccessTokenStore | |
| 20 virtual void DoLoadAccessTokens( | |
| 21 scoped_refptr<CancelableRequest<LoadAccessTokensCallbackType> > request); | |
| 22 virtual void SaveAccessToken( | |
| 23 const GURL& server_url, const string16& access_token); | |
| 24 | |
| 25 AccessTokenSet access_token_set_; | |
| 26 scoped_refptr<CancelableRequest<LoadAccessTokensCallbackType> > request_; | |
| 27 | |
| 28 private: | |
| 29 virtual ~FakeAccessTokenStore(); | |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(FakeAccessTokenStore); | |
| 32 }; | |
| 33 | |
| 34 #endif // CONTENT_BROWSER_GEOLOCATION_FAKE_ACCESS_TOKEN_STORE_H_ | |
| OLD | NEW |