diff options
author | pavely@chromium.org <pavely@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-13 23:52:03 +0000 |
---|---|---|
committer | pavely@chromium.org <pavely@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-13 23:52:03 +0000 |
commit | b67c18c667575649126831940f07e3c420d29cfc (patch) | |
tree | 9003b7db2b0aebc3ef7df5ecf221834ec1393fa6 /sync/test/engine/mock_connection_manager.cc | |
parent | effc83ba229132cabfa86df3a396b564a573f38c (diff) | |
download | chromium_src-b67c18c667575649126831940f07e3c420d29cfc.zip chromium_src-b67c18c667575649126831940f07e3c420d29cfc.tar.gz chromium_src-b67c18c667575649126831940f07e3c420d29cfc.tar.bz2 |
Use OAuth2 token for sync
ProfileSyncService requests access token from OAuth2TokenService and passes it
to ServerConnectionManager through UpdateCredentials. When server returns
AUTH_ERROR it gets propagated to ProfileSyncService through OnGetStatusChange
call. At this point ProfileSyncService needs to invalidate old token with
OAuth2TokenService and request a new one.
Access token is requested in PSS::StartUp since this is the place where all
preconditions are verified. There is a call to pre-request access token in
Initialize and Observe after Login token is loaded.
There are still two tests disabled, I'll fix them and update this CR.
BUG=226464
TBR=jhawkins@chromium.org
Review URL: https://chromiumcodereview.appspot.com/15421011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/test/engine/mock_connection_manager.cc')
-rw-r--r-- | sync/test/engine/mock_connection_manager.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sync/test/engine/mock_connection_manager.cc b/sync/test/engine/mock_connection_manager.cc index 199d568..073a3be 100644 --- a/sync/test/engine/mock_connection_manager.cc +++ b/sync/test/engine/mock_connection_manager.cc @@ -34,7 +34,7 @@ static char kValidAuthToken[] = "AuthToken"; static char kCacheGuid[] = "kqyg7097kro6GSUod+GSg=="; MockConnectionManager::MockConnectionManager(syncable::Directory* directory) - : ServerConnectionManager("unused", 0, false), + : ServerConnectionManager("unused", 0, false, false), server_reachable_(true), conflict_all_commits_(false), conflict_n_commits_(0), @@ -52,7 +52,7 @@ MockConnectionManager::MockConnectionManager(syncable::Directory* directory) use_legacy_bookmarks_protocol_(false), num_get_updates_requests_(0) { SetNewTimestamp(0); - SetAuthToken(kValidAuthToken, base::Time()); + SetAuthToken(kValidAuthToken); } MockConnectionManager::~MockConnectionManager() { |