Index: chromecast/shell/browser/geolocation/cast_access_token_store.h |
diff --git a/chromecast/shell/browser/geolocation/cast_access_token_store.h b/chromecast/shell/browser/geolocation/cast_access_token_store.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4ec069b58f96691888a5e3aa12e684cc79d425f1 |
--- /dev/null |
+++ b/chromecast/shell/browser/geolocation/cast_access_token_store.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROMECAST_SHELL_BROWSER_GEOLOCATION_CAST_ACCESS_TOKEN_STORE_H_ |
+#define CHROMECAST_SHELL_BROWSER_GEOLOCATION_CAST_ACCESS_TOKEN_STORE_H_ |
+ |
+#include "base/macros.h" |
+#include "content/public/browser/access_token_store.h" |
+ |
+namespace content { |
+class BrowserContext; |
+} |
+ |
+namespace chromecast { |
+namespace shell { |
+ |
+// Access token store for chromecast devices used to initialize the network |
+// location provider. |
+class CastAccessTokenStore : public content::AccessTokenStore { |
+ public: |
+ explicit CastAccessTokenStore(content::BrowserContext* browser_context); |
+ |
+ private: |
+ virtual ~CastAccessTokenStore(); |
+ |
+ // AccessTokenStore implementation: |
+ virtual void LoadAccessTokens( |
+ const LoadAccessTokensCallbackType& callback) OVERRIDE; |
+ virtual void SaveAccessToken( |
+ const GURL& server_url, const base::string16& access_token) OVERRIDE; |
+ |
+ void GetRequestContextGetterOnUIThread(); |
+ void RespondOnOriginatingThread(); |
+ |
+ content::BrowserContext* const browser_context_; |
+ net::URLRequestContextGetter* request_context_; |
+ AccessTokenSet access_token_set_; |
+ LoadAccessTokensCallbackType callback_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CastAccessTokenStore); |
+}; |
+ |
+} // namespace shell |
+} // namespace chromecast |
+ |
+#endif // CHROMECAST_SHELL_BROWSER_GEOLOCATION_CAST_ACCESS_TOKEN_STORE_H_ |