atom_access_token_store.h 1005 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright (c) 2014 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ATOM_BROWSER_ATOM_ACCESS_TOKEN_STORE_H_
  5. #define ATOM_BROWSER_ATOM_ACCESS_TOKEN_STORE_H_
  6. #include "content/public/browser/access_token_store.h"
  7. namespace atom {
  8. class AtomBrowserContext;
  9. namespace internal {
  10. class TokenLoadingJob;
  11. }
  12. class AtomAccessTokenStore : public content::AccessTokenStore {
  13. public:
  14. AtomAccessTokenStore();
  15. ~AtomAccessTokenStore();
  16. // content::AccessTokenStore:
  17. void LoadAccessTokens(
  18. const LoadAccessTokensCallback& callback) override;
  19. void SaveAccessToken(const GURL& server_url,
  20. const base::string16& access_token) override;
  21. private:
  22. void RunTokenLoadingJob(scoped_refptr<internal::TokenLoadingJob> job);
  23. scoped_refptr<AtomBrowserContext> browser_context_;
  24. DISALLOW_COPY_AND_ASSIGN(AtomAccessTokenStore);
  25. };
  26. } // namespace atom
  27. #endif // ATOM_BROWSER_ATOM_ACCESS_TOKEN_STORE_H_