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

Side by Side Diff: chrome/browser/sync/profile_sync_service.h

Issue 10534075: [sync] Make SetSetupInProgress kick sync engine when needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove call to SetSyncSetupCompleted, and change kick-mechanism Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // if the user is customizing sync after already completing setup once). 272 // if the user is customizing sync after already completing setup once).
273 // ProfileSyncService uses this to determine if it's OK to start syncing, or 273 // ProfileSyncService uses this to determine if it's OK to start syncing, or
274 // if the user is still setting up the initial sync configuration. 274 // if the user is still setting up the initial sync configuration.
275 virtual bool FirstSetupInProgress() const; 275 virtual bool FirstSetupInProgress() const;
276 276
277 // Called by the UI to notify the ProfileSyncService that UI is visible so it 277 // Called by the UI to notify the ProfileSyncService that UI is visible so it
278 // will not start syncing. This tells sync whether it's safe to start 278 // will not start syncing. This tells sync whether it's safe to start
279 // downloading data types yet (we don't start syncing until after sync setup 279 // downloading data types yet (we don't start syncing until after sync setup
280 // is complete). The UI calls this as soon as any part of the signin wizard is 280 // is complete). The UI calls this as soon as any part of the signin wizard is
281 // displayed (even just the login UI). 281 // displayed (even just the login UI).
282 void set_setup_in_progress(bool setup_in_progress) { 282 // If |setup_in_progress| is false, this also kicks the sync engine to ensure
283 setup_in_progress_ = setup_in_progress; 283 // that data download starts.
284 } 284 virtual void SetSetupInProgress(bool setup_in_progress);
285 285
286 // Returns true if the SyncBackendHost has told us it's ready to accept 286 // Returns true if the SyncBackendHost has told us it's ready to accept
287 // changes. 287 // changes.
288 // [REMARK] - it is safe to call this function only from the ui thread. 288 // [REMARK] - it is safe to call this function only from the ui thread.
289 // because the variable is not thread safe and should only be accessed from 289 // because the variable is not thread safe and should only be accessed from
290 // single thread. If we want multiple threads to access this(and there is 290 // single thread. If we want multiple threads to access this(and there is
291 // currently no need to do so) we need to protect this with a lock. 291 // currently no need to do so) we need to protect this with a lock.
292 // TODO(timsteele): What happens if the bookmark model is loaded, a change 292 // TODO(timsteele): What happens if the bookmark model is loaded, a change
293 // takes place, and the backend isn't initialized yet? 293 // takes place, and the backend isn't initialized yet?
294 virtual bool sync_initialized() const; 294 virtual bool sync_initialized() const;
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 browser_sync::Experiments current_experiments; 757 browser_sync::Experiments current_experiments;
758 758
759 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 759 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
760 }; 760 };
761 761
762 bool ShouldShowActionOnUI( 762 bool ShouldShowActionOnUI(
763 const browser_sync::SyncProtocolError& error); 763 const browser_sync::SyncProtocolError& error);
764 764
765 765
766 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 766 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698