| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 9 #include "content/public/browser/access_token_store.h" | 10 #include "content/public/browser/access_token_store.h" |
| 10 | 11 |
| 11 class PrefRegistrySimple; | 12 class PrefRegistrySimple; |
| 12 | 13 |
| 13 // 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. |
| 14 class ChromeAccessTokenStore : public content::AccessTokenStore { | 15 class ChromeAccessTokenStore : public content::AccessTokenStore { |
| 15 public: | 16 public: |
| 16 static void RegisterPrefs(PrefRegistrySimple* registry); | 17 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 17 | 18 |
| 18 ChromeAccessTokenStore(); | 19 ChromeAccessTokenStore(); |
| 19 | 20 |
| 20 void LoadAccessTokens(const LoadAccessTokensCallbackType& request) override; | 21 void LoadAccessTokens(const LoadAccessTokensCallbackType& request) override; |
| 21 | 22 |
| 22 private: | 23 private: |
| 23 ~ChromeAccessTokenStore() override; | 24 ~ChromeAccessTokenStore() override; |
| 24 | 25 |
| 25 // AccessTokenStore | 26 // AccessTokenStore |
| 26 void SaveAccessToken(const GURL& server_url, | 27 void SaveAccessToken(const GURL& server_url, |
| 27 const base::string16& access_token) override; | 28 const base::string16& access_token) override; |
| 28 | 29 |
| 29 DISALLOW_COPY_AND_ASSIGN(ChromeAccessTokenStore); | 30 DISALLOW_COPY_AND_ASSIGN(ChromeAccessTokenStore); |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ | 33 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ |
| OLD | NEW |