Home | History | Annotate | Download | only in geolocation
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_
      6 #define CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_
      7 
      8 #include "content/public/browser/access_token_store.h"
      9 
     10 namespace content {
     11 class ShellBrowserContext;
     12 
     13 // Dummy access token store used to initialise the network location provider.
     14 class ShellAccessTokenStore : public content::AccessTokenStore {
     15  public:
     16   explicit ShellAccessTokenStore(
     17       content::ShellBrowserContext* shell_browser_context);
     18 
     19  private:
     20   virtual ~ShellAccessTokenStore();
     21 
     22   void GetRequestContextOnUIThread(
     23       content::ShellBrowserContext* shell_browser_context);
     24   void RespondOnOriginatingThread(const LoadAccessTokensCallbackType& callback);
     25 
     26   // AccessTokenStore
     27   virtual void LoadAccessTokens(
     28       const LoadAccessTokensCallbackType& callback) OVERRIDE;
     29 
     30   virtual void SaveAccessToken(
     31       const GURL& server_url, const string16& access_token) OVERRIDE;
     32 
     33   content::ShellBrowserContext* shell_browser_context_;
     34   net::URLRequestContextGetter* system_request_context_;
     35 
     36   DISALLOW_COPY_AND_ASSIGN(ShellAccessTokenStore);
     37 };
     38 
     39 }  // namespace content
     40 
     41 #endif  // CONTENT_SHELL_GEOLOCATION_SHELL_ACCESS_TOKEN_STORE_H_
     42