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 // Defines the Geolocation access token store, and associated factory function. | 5 // Defines the Geolocation access token store, and associated factory function. |
6 // An access token store is responsible for providing the API to persist | 6 // An access token store is responsible for providing the API to persist |
7 // access tokens, one at a time, and to load them back on mass. | 7 // access tokens, one at a time, and to load them back on mass. |
8 // The API is a little more complex than one might wish, due to the need for | 8 // The API is a little more complex than one might wish, due to the need for |
9 // prefs access to happen asynchronously on the UI thread. | 9 // prefs access to happen asynchronously on the UI thread. |
10 // This API is provided as abstract base classes to allow mocking and testing | 10 // This API is provided as abstract base classes to allow mocking and testing |
11 // of clients, without dependency on browser process singleton objects etc. | 11 // of clients, without dependency on browser process singleton objects etc. |
12 | 12 |
13 #ifndef CONTENT_PUBLIC_BROWSER_ACCESS_TOKEN_STORE_H_ | 13 #ifndef CONTENT_PUBLIC_BROWSER_ACCESS_TOKEN_STORE_H_ |
14 #define CONTENT_PUBLIC_BROWSER_ACCESS_TOKEN_STORE_H_ | 14 #define CONTENT_PUBLIC_BROWSER_ACCESS_TOKEN_STORE_H_ |
15 | 15 |
16 #include <map> | 16 #include <map> |
17 | 17 |
18 #include "base/callback.h" | 18 #include "base/callback.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
22 #include "googleurl/src/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 class GURL; | 24 class GURL; |
25 | 25 |
26 namespace net { | 26 namespace net { |
27 class URLRequestContextGetter; | 27 class URLRequestContextGetter; |
28 } | 28 } |
29 | 29 |
30 namespace content { | 30 namespace content { |
31 | 31 |
32 // Provides storage for the access token used in the network request. | 32 // Provides storage for the access token used in the network request. |
(...skipping 18 matching lines...) Expand all Loading... |
51 | 51 |
52 protected: | 52 protected: |
53 friend class base::RefCountedThreadSafe<AccessTokenStore>; | 53 friend class base::RefCountedThreadSafe<AccessTokenStore>; |
54 CONTENT_EXPORT AccessTokenStore() {} | 54 CONTENT_EXPORT AccessTokenStore() {} |
55 CONTENT_EXPORT virtual ~AccessTokenStore() {} | 55 CONTENT_EXPORT virtual ~AccessTokenStore() {} |
56 }; | 56 }; |
57 | 57 |
58 } // namespace content | 58 } // namespace content |
59 | 59 |
60 #endif // CONTENT_PUBLIC_BROWSER_ACCESS_TOKEN_STORE_H_ | 60 #endif // CONTENT_PUBLIC_BROWSER_ACCESS_TOKEN_STORE_H_ |
OLD | NEW |