Chromium Code Reviews| Index: chrome/browser/managed_mode/managed_user_token_fetcher.h |
| diff --git a/chrome/browser/managed_mode/managed_user_token_fetcher.h b/chrome/browser/managed_mode/managed_user_token_fetcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..22fdd4eeb88b74815f8daf3a16f63a882b25a48b |
| --- /dev/null |
| +++ b/chrome/browser/managed_mode/managed_user_token_fetcher.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2013 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 CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_TOKEN_FETCHER_H_ |
| +#define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_TOKEN_FETCHER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/callback_forward.h" |
| +#include "base/compiler_specific.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/string16.h" |
| + |
| +class GoogleServiceAuthError; |
| +class OAuth2TokenService; |
| + |
| +namespace net { |
| +class URLRequestContextGetter; |
| +} |
| + |
| +class ManagedUserTokenFetcher { |
|
Andrew T Wilson (Slow)
2013/05/27 13:52:15
What does this class do? It's not clear to me what
Bernhard Bauer
2013/05/27 14:42:13
Added a comment.
|
| + public: |
| + typedef base::Callback<void(const GoogleServiceAuthError& /* error */, |
| + const std::string& /* token */)> TokenCallback; |
| + |
| + static scoped_ptr<ManagedUserTokenFetcher> Create( |
| + OAuth2TokenService* oauth2_token_service, |
| + net::URLRequestContextGetter* context); |
| + |
| + virtual ~ManagedUserTokenFetcher(); |
| + |
| + virtual void Start(const std::string& managed_user_id, |
| + const string16& name, |
| + const std::string& device_name, |
| + const TokenCallback& callback) = 0; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_TOKEN_FETCHER_H_ |