diff options
author | chron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 01:24:45 +0000 |
---|---|---|
committer | chron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 01:24:45 +0000 |
commit | 8e4c296105bc8dda25002951118298bcfab1b88b (patch) | |
tree | 502aff4ec60c64c7912c1a977febbac41d9b0d41 /chrome/browser/net/gaia/token_service.h | |
parent | 706bf7278b50b4292555e55adbf255b7aa49b12a (diff) | |
download | chromium_src-8e4c296105bc8dda25002951118298bcfab1b88b.zip chromium_src-8e4c296105bc8dda25002951118298bcfab1b88b.tar.gz chromium_src-8e4c296105bc8dda25002951118298bcfab1b88b.tar.bz2 |
Add the TokenService to the chrome profile, and use it to pass the LSID from ChromiumOS login into Sync.
This is just initial groundlaying for replacing the internal sync auth stack. IssueAuthToken is not yet used in this CL.
TEST=Run chromium OS. Login using your credentials. Verify that sync works in about:sync.
BUG=47093
Review URL: http://codereview.chromium.org/2872034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52250 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/gaia/token_service.h')
-rw-r--r-- | chrome/browser/net/gaia/token_service.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/browser/net/gaia/token_service.h b/chrome/browser/net/gaia/token_service.h new file mode 100644 index 0000000..c8b7778 --- /dev/null +++ b/chrome/browser/net/gaia/token_service.h @@ -0,0 +1,31 @@ +// Copyright (c) 2010 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. +// +// The TokenService will supply authentication tokens for any service that +// needs it. One such service is Sync. +// For the time being, the Token Service just supplies the LSID from the +// ChromiumOS login. In the future, it'll have a bit more logic and supply +// only AuthTokens from Gaia, and not LSIDs. + +#ifndef CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_ +#define CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_ + +#include "chrome/common/net/gaia/gaia_auth_consumer.h" + +class TokenService { + public: + void SetClientLoginResult( + const GaiaAuthConsumer::ClientLoginResult& credentials); + + bool HasLsid(); + const std::string& GetLsid(); + + // TODO(chron): Token broadcast will require removing a lot of auth code + // from sync. For the time being we'll start with LSID passing. + + private: + GaiaAuthConsumer::ClientLoginResult credentials_; +}; + +#endif // CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_ |