OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ |
6 #define CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/public/browser/access_token_store.h" | 10 #include "content/public/browser/access_token_store.h" |
11 | 11 |
12 class PrefService; | 12 class PrefService; |
13 | 13 |
14 // Creates a new access token store backed by the global chome prefs. | 14 // Creates a new access token store backed by the global chome prefs. |
15 class ChromeAccessTokenStore : public content::AccessTokenStore { | 15 class ChromeAccessTokenStore : public content::AccessTokenStore { |
16 public: | 16 public: |
17 static void RegisterPrefs(PrefService* prefs); | 17 static void RegisterPrefs(PrefService* prefs); |
18 | 18 |
19 ChromeAccessTokenStore(); | 19 ChromeAccessTokenStore(); |
20 virtual ~ChromeAccessTokenStore(); | |
21 | 20 |
22 virtual void LoadAccessTokens( | 21 virtual void LoadAccessTokens( |
23 const LoadAccessTokensCallbackType& request) OVERRIDE; | 22 const LoadAccessTokensCallbackType& request) OVERRIDE; |
24 | 23 |
25 private: | 24 private: |
| 25 virtual ~ChromeAccessTokenStore(); |
| 26 |
26 // AccessTokenStore | 27 // AccessTokenStore |
27 virtual void SaveAccessToken( | 28 virtual void SaveAccessToken( |
28 const GURL& server_url, const string16& access_token) OVERRIDE; | 29 const GURL& server_url, const string16& access_token) OVERRIDE; |
29 | 30 |
30 DISALLOW_COPY_AND_ASSIGN(ChromeAccessTokenStore); | 31 DISALLOW_COPY_AND_ASSIGN(ChromeAccessTokenStore); |
31 }; | 32 }; |
32 | 33 |
33 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ | 34 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ |
OLD | NEW |