| Index: chrome/browser/sync/engine/syncer_proto_util.cc
|
| ===================================================================
|
| --- chrome/browser/sync/engine/syncer_proto_util.cc (revision 58702)
|
| +++ chrome/browser/sync/engine/syncer_proto_util.cc (working copy)
|
| @@ -6,9 +6,9 @@
|
|
|
| #include "base/format_macros.h"
|
| #include "base/string_util.h"
|
| -#include "chrome/browser/sync/engine/auth_watcher.h"
|
| #include "chrome/browser/sync/engine/net/server_connection_manager.h"
|
| #include "chrome/browser/sync/engine/syncer.h"
|
| +#include "chrome/browser/sync/engine/syncer_types.h"
|
| #include "chrome/browser/sync/engine/syncer_util.h"
|
| #include "chrome/browser/sync/protocol/service_constants.h"
|
| #include "chrome/browser/sync/sessions/sync_session.h"
|
| @@ -124,7 +124,7 @@
|
|
|
| // static
|
| bool SyncerProtoUtil::PostAndProcessHeaders(ServerConnectionManager* scm,
|
| - AuthWatcher* auth_watcher,
|
| + sessions::SyncSession* session,
|
| const ClientToServerMessage& msg,
|
| ClientToServerResponse* response) {
|
|
|
| @@ -144,12 +144,9 @@
|
| std::string new_token =
|
| http_response.update_client_auth_header;
|
| if (!new_token.empty()) {
|
| - // We could also do this in the SCM's PostBufferWithAuth.
|
| - // But then we could be in the middle of authentication, which seems
|
| - // like a bad time to update the token. A consequence of this is that
|
| - // we can't reset the cookie in response to auth attempts, but this
|
| - // should be OK.
|
| - auth_watcher->RenewAuthToken(new_token);
|
| + SyncerEvent event(SyncerEvent::UPDATED_TOKEN);
|
| + event.updated_token = new_token;
|
| + session->context()->syncer_event_channel()->Notify(event);
|
| }
|
|
|
| if (response->ParseFromString(rx)) {
|
| @@ -189,7 +186,7 @@
|
| }
|
|
|
| if (!PostAndProcessHeaders(session->context()->connection_manager(),
|
| - session->context()->auth_watcher(),
|
| + session,
|
| msg,
|
| response)) {
|
| return false;
|
|
|