Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Side by Side Diff: chrome/browser/geolocation/access_token_store.h

Issue 2937010: Reland r52336. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/gears_integration.cc ('k') | chrome/browser/google_url_tracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_ 13 #ifndef CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_
14 #define CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_ 14 #define CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_
15 15
16 #include <map> 16 #include <map>
17 17
18 #include "base/ref_counted.h" 18 #include "base/ref_counted.h"
19 #include "base/string16.h" 19 #include "base/string16.h"
20 #include "base/task.h"
21 #include "chrome/browser/cancelable_request.h" 20 #include "chrome/browser/cancelable_request.h"
22 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
23 22
24 class GURL; 23 class GURL;
25 class PrefService; 24 class PrefService;
26 25
27 // Provides storage for the access token used in the network request. 26 // Provides storage for the access token used in the network request.
28 class AccessTokenStore : public base::RefCountedThreadSafe<AccessTokenStore>, 27 class AccessTokenStore : public base::RefCountedThreadSafe<AccessTokenStore>,
29 public CancelableRequestProvider { 28 public CancelableRequestProvider {
30 public: 29 public:
(...skipping 20 matching lines...) Expand all
51 scoped_refptr<CancelableRequest<LoadAccessTokensCallbackType> > req) = 0; 50 scoped_refptr<CancelableRequest<LoadAccessTokensCallbackType> > req) = 0;
52 51
53 private: 52 private:
54 DISALLOW_COPY_AND_ASSIGN(AccessTokenStore); 53 DISALLOW_COPY_AND_ASSIGN(AccessTokenStore);
55 }; 54 };
56 55
57 // Creates a new access token store backed by the global chome prefs. 56 // Creates a new access token store backed by the global chome prefs.
58 AccessTokenStore* NewChromePrefsAccessTokenStore(); 57 AccessTokenStore* NewChromePrefsAccessTokenStore();
59 58
60 #endif // CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_ 59 #endif // CHROME_BROWSER_GEOLOCATION_ACCESS_TOKEN_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/gears_integration.cc ('k') | chrome/browser/google_url_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698