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

Unified Diff: chrome/browser/sync/sessions/session_data_type_controller.h

Issue 394223002: Disable tab syncing when history saving is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed remaining comments; Created 6 years, 4 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: chrome/browser/sync/sessions/session_data_type_controller.h
diff --git a/chrome/browser/sync/sessions/session_data_type_controller.h b/chrome/browser/sync/sessions/session_data_type_controller.h
index 3ba97f45ae1d5a9a3d7a819e644984fb9e46da55..7201d145d99c122d4c6021ac606eb62aa3a6d2a9 100644
--- a/chrome/browser/sync/sessions/session_data_type_controller.h
+++ b/chrome/browser/sync/sessions/session_data_type_controller.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_
#define CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_
+#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/sync/glue/local_device_info_provider.h"
#include "components/sync_driver/ui_data_type_controller.h"
#include "content/public/browser/notification_observer.h"
@@ -32,15 +33,19 @@ class SessionDataTypeController : public sync_driver::UIDataTypeController,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- protected:
- virtual ~SessionDataTypeController();
+ // UIDataTypeController interface.
virtual bool StartModels() OVERRIDE;
virtual void StopModels() OVERRIDE;
+ virtual bool ReadyForStart() const OVERRIDE;
+
+ protected:
+ virtual ~SessionDataTypeController();
private:
bool IsWaiting();
void MaybeCompleteLoading();
void OnLocalDeviceInfoInitialized();
+ void OnSavingBrowserHistoryPrefChanged();
Profile* const profile_;
@@ -54,10 +59,11 @@ class SessionDataTypeController : public sync_driver::UIDataTypeController,
bool waiting_on_session_restore_;
bool waiting_on_local_device_info_;
+ PrefChangeRegistrar pref_registrar_;
+
DISALLOW_COPY_AND_ASSIGN(SessionDataTypeController);
};
} // namespace browser_sync
#endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_
-

Powered by Google App Engine
This is Rietveld 408576698