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

Side by Side Diff: device/geolocation/access_token_store.h

Issue 2200483002: Geolocation cleanup: run clang-format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | device/geolocation/empty_wifi_data_provider.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) 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
(...skipping 24 matching lines...) Expand all
35 void(AccessTokenMap, const scoped_refptr<net::URLRequestContextGetter>&)> 35 void(AccessTokenMap, const scoped_refptr<net::URLRequestContextGetter>&)>
36 LoadAccessTokensCallback; 36 LoadAccessTokensCallback;
37 37
38 // |callback| will be invoked once per LoadAccessTokens call, after existing 38 // |callback| will be invoked once per LoadAccessTokens call, after existing
39 // access tokens have been loaded from persistent store. As a convenience the 39 // access tokens have been loaded from persistent store. As a convenience the
40 // URLRequestContextGetter is also supplied as an argument in |callback|, as 40 // URLRequestContextGetter is also supplied as an argument in |callback|, as
41 // in Chrome the call to obtain this must also be performed on the UI thread 41 // in Chrome the call to obtain this must also be performed on the UI thread
42 // so it is efficient to piggyback it onto this request. 42 // so it is efficient to piggyback it onto this request.
43 virtual void LoadAccessTokens(const LoadAccessTokensCallback& callback) = 0; 43 virtual void LoadAccessTokens(const LoadAccessTokensCallback& callback) = 0;
44 44
45 virtual void SaveAccessToken( 45 virtual void SaveAccessToken(const GURL& server_url,
46 const GURL& server_url, const base::string16& access_token) = 0; 46 const base::string16& access_token) = 0;
47 47
48 protected: 48 protected:
49 friend class base::RefCountedThreadSafe<AccessTokenStore>; 49 friend class base::RefCountedThreadSafe<AccessTokenStore>;
50 DEVICE_GEOLOCATION_EXPORT AccessTokenStore() {} 50 DEVICE_GEOLOCATION_EXPORT AccessTokenStore() {}
51 DEVICE_GEOLOCATION_EXPORT virtual ~AccessTokenStore() {} 51 DEVICE_GEOLOCATION_EXPORT virtual ~AccessTokenStore() {}
52 }; 52 };
53 53
54 } // namespace device 54 } // namespace device
55 55
56 #endif // DEVICE_GEOLOCATION_ACCESS_TOKEN_STORE_H_ 56 #endif // DEVICE_GEOLOCATION_ACCESS_TOKEN_STORE_H_
OLDNEW
« no previous file with comments | « no previous file | device/geolocation/empty_wifi_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698