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

Side by Side Diff: content/public/browser/access_token_store.h

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 15 matching lines...) Expand all
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.
33 class AccessTokenStore : public base::RefCountedThreadSafe<AccessTokenStore> { 33 class AccessTokenStore : public base::RefCountedThreadSafe<AccessTokenStore> {
34 public: 34 public:
35 // Map of server URLs to associated access token. 35 // Map of server URLs to associated access token.
36 typedef std::map<GURL, string16> AccessTokenSet; 36 typedef std::map<GURL, base::string16> AccessTokenSet;
37 typedef base::Callback<void(AccessTokenSet, net::URLRequestContextGetter*)> 37 typedef base::Callback<void(AccessTokenSet, net::URLRequestContextGetter*)>
38 LoadAccessTokensCallbackType; 38 LoadAccessTokensCallbackType;
39 39
40 // |callback| will be invoked once per LoadAccessTokens call, after existing 40 // |callback| will be invoked once per LoadAccessTokens call, after existing
41 // access tokens have been loaded from persistent store. As a convenience the 41 // access tokens have been loaded from persistent store. As a convenience the
42 // URLRequestContextGetter is also supplied as an argument in |callback|, as 42 // URLRequestContextGetter is also supplied as an argument in |callback|, as
43 // in Chrome the call to obtain this must also be performed on the UI thread 43 // in Chrome the call to obtain this must also be performed on the UI thread
44 // so it is efficient to piggyback it onto this request. 44 // so it is efficient to piggyback it onto this request.
45 // Takes ownership of |callback|. 45 // Takes ownership of |callback|.
46 virtual void LoadAccessTokens( 46 virtual void LoadAccessTokens(
47 const LoadAccessTokensCallbackType& callback) = 0; 47 const LoadAccessTokensCallbackType& callback) = 0;
48 48
49 virtual void SaveAccessToken( 49 virtual void SaveAccessToken(
50 const GURL& server_url, const string16& access_token) = 0; 50 const GURL& server_url, const base::string16& access_token) = 0;
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_
OLDNEW
« no previous file with comments | « content/port/browser/web_contents_view_port.h ('k') | content/public/browser/browser_child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698