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

Unified Diff: components/browser_sync/profile_sync_service.h

Issue 2385083002: Make ProfileSyncService a client of memory coordinator (Closed)
Patch Set: (rebasing) Created 4 years, 2 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/profile_sync_service.h
diff --git a/components/browser_sync/profile_sync_service.h b/components/browser_sync/profile_sync_service.h
index f236e9a5f87d9d07837f20fe1739ff5bf1949f86..9d3667c28ea6878841a11a7b092e1e03bae474bc 100644
--- a/components/browser_sync/profile_sync_service.h
+++ b/components/browser_sync/profile_sync_service.h
@@ -16,6 +16,7 @@
#include "base/gtest_prod_util.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/memory/memory_coordinator_client.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
@@ -187,7 +188,8 @@ class ProfileSyncService : public sync_driver::SyncService,
public OAuth2TokenService::Consumer,
public OAuth2TokenService::Observer,
public SigninManagerBase::Observer,
- public GaiaCookieManagerService::Observer {
+ public GaiaCookieManagerService::Observer,
+ public base::MemoryCoordinatorClient {
public:
typedef SyncBackendHost::Status Status;
typedef base::Callback<bool(void)> PlatformSyncAllowedProvider;
@@ -671,6 +673,11 @@ class ProfileSyncService : public sync_driver::SyncService,
friend class TestProfileSyncService;
+ // base::MemoryCoordinatorClient implementation:
+ void OnMemoryStateChange(base::MemoryState state) override;
+
+ void IncrementMemoryPressureWarningCount();
+
// Stops the sync engine. Does NOT set IsSyncRequested to false. Use
// RequestStop for that. |data_fate| controls whether the local sync data is
// deleted or kept when the engine shuts down.
« no previous file with comments | « no previous file | components/browser_sync/profile_sync_service.cc » ('j') | components/browser_sync/profile_sync_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698