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

Unified Diff: components/sync_driver/startup_controller.h

Issue 1858673002: [Sync] Inject startup dependencies into StartupController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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/sync_driver/startup_controller.h
diff --git a/components/sync_driver/startup_controller.h b/components/sync_driver/startup_controller.h
index 443d9f9d36bb46ce10e272a5b59db68c47b058e3..9ebb9d56834f7a9e6d3cebfbe2bae50cfc7f03ad 100644
--- a/components/sync_driver/startup_controller.h
+++ b/components/sync_driver/startup_controller.h
@@ -10,9 +10,6 @@
#include "base/time/time.h"
#include "sync/internal_api/public/base/model_type.h"
-class ProfileOAuth2TokenService;
-class SigninManagerWrapper;
-
namespace sync_driver {
class SyncPrefs;
}
@@ -24,9 +21,8 @@ namespace browser_sync {
// to as "the backend").
class StartupController {
public:
- StartupController(const ProfileOAuth2TokenService* token_service,
- const sync_driver::SyncPrefs* sync_prefs,
- const SigninManagerWrapper* signin,
+ StartupController(const sync_driver::SyncPrefs* sync_prefs,
+ base::Callback<bool()> can_start,
base::Closure start_backend);
~StartupController();
@@ -89,9 +85,9 @@ class StartupController {
const sync_driver::SyncPrefs* sync_prefs_;
- const ProfileOAuth2TokenService* token_service_;
-
- const SigninManagerWrapper* signin_;
+ // A function that can be invoked repeatedly to determine whether sync can be
+ // started. |start_backend_| should not be invoked unless this returns true.
+ base::Callback<bool()> can_start_;
// The callback we invoke when it's time to call expensive
// startup routines for the sync backend.
« no previous file with comments | « components/browser_sync/browser/profile_sync_service.cc ('k') | components/sync_driver/startup_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698