Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: components/browser_sync/browser/profile_sync_service.h

Issue 1849563005: [Sync] Add cookie jar mismatch logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests again Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/browser_sync/browser/profile_sync_service.h
diff --git a/components/browser_sync/browser/profile_sync_service.h b/components/browser_sync/browser/profile_sync_service.h
index 430b919a827f5117a0c0521f1cc57c47f18dc90f..be244d949c50afd046fe1cc968a8c0f1f66f5238 100644
--- a/components/browser_sync/browser/profile_sync_service.h
+++ b/components/browser_sync/browser/profile_sync_service.h
@@ -8,6 +8,7 @@
#include <set>
#include <string>
#include <utility>
+#include <vector>
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
@@ -24,6 +25,7 @@
#include "base/timer/timer.h"
#include "build/build_config.h"
#include "components/keyed_service/core/keyed_service.h"
+#include "components/signin/core/browser/gaia_cookie_manager_service.h"
#include "components/signin/core/browser/signin_manager_base.h"
#include "components/sync_driver/data_type_controller.h"
#include "components/sync_driver/data_type_manager.h"
@@ -179,7 +181,8 @@ class ProfileSyncService : public sync_driver::SyncService,
public KeyedService,
public OAuth2TokenService::Consumer,
public OAuth2TokenService::Observer,
- public SigninManagerBase::Observer {
+ public SigninManagerBase::Observer,
+ public GaiaCookieManagerService::Observer {
public:
typedef browser_sync::SyncBackendHost::Status Status;
typedef base::Callback<bool(void)> PlatformSyncAllowedProvider;
@@ -238,6 +241,7 @@ class ProfileSyncService : public sync_driver::SyncService,
scoped_ptr<sync_driver::SyncClient> sync_client;
scoped_ptr<SigninManagerWrapper> signin_wrapper;
ProfileOAuth2TokenService* oauth2_token_service = nullptr;
+ GaiaCookieManagerService* gaia_cookie_manager_service = nullptr;
StartBehavior start_behavior = MANUAL_START;
syncer::NetworkTimeUpdateCallback network_time_update_callback;
base::FilePath base_directory;
@@ -406,6 +410,11 @@ class ProfileSyncService : public sync_driver::SyncService,
void GoogleSignedOut(const std::string& account_id,
const std::string& username) override;
+ // GaiaCookieManagerService::Observer implementation.
+ void OnGaiaAccountsInCookieUpdated(
+ const std::vector<gaia::ListedAccount>& accounts,
+ const GoogleServiceAuthError& error) override;
+
// Get the sync status code.
SyncStatusSummary QuerySyncStatusSummary();
@@ -946,6 +955,10 @@ class ProfileSyncService : public sync_driver::SyncService,
GoogleServiceAuthError last_get_token_error_;
base::Time next_token_request_time_;
+ // The gaia cookie manager. Used for monitoring cookie jar changes to detect
+ // when the user signs out of the content area.
+ GaiaCookieManagerService* const gaia_cookie_manager_service_;
+
scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device_;
// Locally owned SyncableService and ModelTypeService implementations.

Powered by Google App Engine
This is Rietveld 408576698