Disable flaky testHTTPResponseTimelineRecorder on Mac
[chromium-blink-merge.git] / chromecast / browser / geolocation / cast_access_token_store.h
blob27de8b3b2ed5e676f49a6393787b1982eec06dde
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_BROWSER_GEOLOCATION_CAST_ACCESS_TOKEN_STORE_H_
6 #define CHROMECAST_BROWSER_GEOLOCATION_CAST_ACCESS_TOKEN_STORE_H_
8 #include "base/macros.h"
9 #include "content/public/browser/access_token_store.h"
11 namespace content {
12 class BrowserContext;
15 namespace chromecast {
16 namespace shell {
18 // Access token store for chromecast devices used to initialize the network
19 // location provider.
20 class CastAccessTokenStore : public content::AccessTokenStore {
21 public:
22 explicit CastAccessTokenStore(content::BrowserContext* browser_context);
24 private:
25 ~CastAccessTokenStore() override;
27 // AccessTokenStore implementation:
28 void LoadAccessTokens(const LoadAccessTokensCallbackType& callback) override;
29 void SaveAccessToken(
30 const GURL& server_url, const base::string16& access_token) override;
32 void GetRequestContextGetterOnUIThread();
33 void RespondOnOriginatingThread();
35 content::BrowserContext* const browser_context_;
36 net::URLRequestContextGetter* request_context_;
37 AccessTokenSet access_token_set_;
38 LoadAccessTokensCallbackType callback_;
40 DISALLOW_COPY_AND_ASSIGN(CastAccessTokenStore);
43 } // namespace shell
44 } // namespace chromecast
46 #endif // CHROMECAST_BROWSER_GEOLOCATION_CAST_ACCESS_TOKEN_STORE_H_