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 CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_ | 5 #ifndef CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_ |
6 #define CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_ | 6 #define CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_ |
7 #pragma once | |
8 | 7 |
9 #include "content/public/browser/access_token_store.h" | 8 #include "content/public/browser/access_token_store.h" |
10 | 9 |
11 // Dummy access token store used to initialise the network location provider. | 10 // Dummy access token store used to initialise the network location provider. |
12 class ShellAccessTokenStore : public content::AccessTokenStore { | 11 class ShellAccessTokenStore : public content::AccessTokenStore { |
13 public: | 12 public: |
14 explicit ShellAccessTokenStore(net::URLRequestContextGetter* request_context); | 13 explicit ShellAccessTokenStore(net::URLRequestContextGetter* request_context); |
15 | 14 |
16 private: | 15 private: |
17 virtual ~ShellAccessTokenStore(); | 16 virtual ~ShellAccessTokenStore(); |
18 | 17 |
19 // AccessTokenStore | 18 // AccessTokenStore |
20 virtual void LoadAccessTokens( | 19 virtual void LoadAccessTokens( |
21 const LoadAccessTokensCallbackType& callback) OVERRIDE; | 20 const LoadAccessTokensCallbackType& callback) OVERRIDE; |
22 | 21 |
23 virtual void SaveAccessToken( | 22 virtual void SaveAccessToken( |
24 const GURL& server_url, const string16& access_token) OVERRIDE; | 23 const GURL& server_url, const string16& access_token) OVERRIDE; |
25 | 24 |
26 static void DidLoadAccessTokens( | 25 static void DidLoadAccessTokens( |
27 net::URLRequestContextGetter* request_context, | 26 net::URLRequestContextGetter* request_context, |
28 const LoadAccessTokensCallbackType& callback); | 27 const LoadAccessTokensCallbackType& callback); |
29 | 28 |
30 net::URLRequestContextGetter* request_context_; | 29 net::URLRequestContextGetter* request_context_; |
31 | 30 |
32 DISALLOW_COPY_AND_ASSIGN(ShellAccessTokenStore); | 31 DISALLOW_COPY_AND_ASSIGN(ShellAccessTokenStore); |
33 }; | 32 }; |
34 | 33 |
35 #endif // CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_ | 34 #endif // CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_ |
OLD | NEW |