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

Unified Diff: components/sync_driver/sync_service.h

Issue 2066493003: Revert of Sync: Support multiple setup UIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « components/sync_driver/fake_sync_service.cc ('k') | components/sync_driver/sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/sync_service.h
diff --git a/components/sync_driver/sync_service.h b/components/sync_driver/sync_service.h
index cf634fe7a62ebffb8499c35ad5931bee2b9e7975..4ca8b42e870f5ea9939a74acd6d0cd43f8746cdd 100644
--- a/components/sync_driver/sync_service.h
+++ b/components/sync_driver/sync_service.h
@@ -8,7 +8,7 @@
#include <memory>
#include <string>
-#include "base/callback.h"
+#include "base/callback_forward.h"
#include "base/location.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
@@ -46,21 +46,6 @@
class OpenTabsUIDelegate;
class SyncClient;
-// UIs that need to prevent Sync startup should hold an instance of this class
-// until the user has finished modifying sync settings. This is not an inner
-// class of SyncService to enable forward declarations.
-class SyncSetupInProgressHandle {
- public:
- // UIs should not construct this directly, but instead call
- // SyncService::GetSetupInProgress().
- explicit SyncSetupInProgressHandle(base::Closure on_destroy);
-
- ~SyncSetupInProgressHandle();
-
- private:
- base::Closure on_destroy_;
-};
-
class SyncService : public DataTypeEncryptionHandler {
public:
// Used to specify the kind of passphrase with which sync data is encrypted.
@@ -82,6 +67,7 @@
// Status of sync server connection, sync token and token request.
struct SyncTokenStatus {
SyncTokenStatus();
+ ~SyncTokenStatus();
// Sync server connection status reported by sync backend.
base::Time connection_status_update_time;
@@ -190,13 +176,12 @@
// Called by the UI to notify the SyncService that UI is visible so it will
// not start syncing. This tells sync whether it's safe to start downloading
// data types yet (we don't start syncing until after sync setup is complete).
- // The UI calls this and holds onto the instance for as long as any part of
- // the signin wizard is displayed (even just the login UI).
- // When the last outstanding handle is deleted, this kicks off the sync engine
- // to ensure that data download starts. In this case,
- // |ReconfigureDatatypeManager| will get triggered.
- virtual std::unique_ptr<SyncSetupInProgressHandle>
- GetSetupInProgressHandle() = 0;
+ // The UI calls this as soon as any part of the signin wizard is displayed
+ // (even just the login UI).
+ // If |setup_in_progress| is false, this also kicks the sync engine to ensure
+ // that data download starts. In this case, |ReconfigureDatatypeManager| will
+ // get triggered.
+ virtual void SetSetupInProgress(bool setup_in_progress) = 0;
// Used by tests.
virtual bool IsSetupInProgress() const = 0;
« no previous file with comments | « components/sync_driver/fake_sync_service.cc ('k') | components/sync_driver/sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698