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

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

Issue 480513004: Stopping the history recording for a supervised user (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored und reformatted. 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 unified diff | Download patch
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 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 // Called by the UI to notify the ProfileSyncService that UI is visible so it 487 // Called by the UI to notify the ProfileSyncService that UI is visible so it
488 // will not start syncing. This tells sync whether it's safe to start 488 // will not start syncing. This tells sync whether it's safe to start
489 // downloading data types yet (we don't start syncing until after sync setup 489 // downloading data types yet (we don't start syncing until after sync setup
490 // is complete). The UI calls this as soon as any part of the signin wizard is 490 // is complete). The UI calls this as soon as any part of the signin wizard is
491 // displayed (even just the login UI). 491 // displayed (even just the login UI).
492 // If |setup_in_progress| is false, this also kicks the sync engine to ensure 492 // If |setup_in_progress| is false, this also kicks the sync engine to ensure
493 // that data download starts. 493 // that data download starts.
494 virtual void SetSetupInProgress(bool setup_in_progress); 494 virtual void SetSetupInProgress(bool setup_in_progress);
495 495
496 // Reconfigures the data type manager with the latest enabled types.
497 // Note: Does not initialize the backend if it is not already initialized.
498 // This function needs to be called only after sync has been initialized
499 // (i.e.,only for reconfigurations). The reason we don't initialize the
500 // backend is because if we had encountered an unrecoverable error we don't
501 // want to startup once more.
502 virtual void ReconfigureDatatypeManager();
503
496 // Returns true if the SyncBackendHost has told us it's ready to accept 504 // Returns true if the SyncBackendHost has told us it's ready to accept
497 // changes. 505 // changes.
498 // [REMARK] - it is safe to call this function only from the ui thread. 506 // [REMARK] - it is safe to call this function only from the ui thread.
499 // because the variable is not thread safe and should only be accessed from 507 // because the variable is not thread safe and should only be accessed from
500 // single thread. If we want multiple threads to access this(and there is 508 // single thread. If we want multiple threads to access this(and there is
501 // currently no need to do so) we need to protect this with a lock. 509 // currently no need to do so) we need to protect this with a lock.
502 // TODO(timsteele): What happens if the bookmark model is loaded, a change 510 // TODO(timsteele): What happens if the bookmark model is loaded, a change
503 // takes place, and the backend isn't initialized yet? 511 // takes place, and the backend isn't initialized yet?
504 virtual bool sync_initialized() const; 512 virtual bool sync_initialized() const;
505 513
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 virtual void StartUpSlowBackendComponents(BackendMode mode); 918 virtual void StartUpSlowBackendComponents(BackendMode mode);
911 919
912 // About-flags experiment names for datatypes that aren't enabled by default 920 // About-flags experiment names for datatypes that aren't enabled by default
913 // yet. 921 // yet.
914 static std::string GetExperimentNameForDataType( 922 static std::string GetExperimentNameForDataType(
915 syncer::ModelType data_type); 923 syncer::ModelType data_type);
916 924
917 // Create and register a new datatype controller. 925 // Create and register a new datatype controller.
918 void RegisterNewDataType(syncer::ModelType data_type); 926 void RegisterNewDataType(syncer::ModelType data_type);
919 927
920 // Reconfigures the data type manager with the latest enabled types.
921 // Note: Does not initialize the backend if it is not already initialized.
922 // This function needs to be called only after sync has been initialized
923 // (i.e.,only for reconfigurations). The reason we don't initialize the
924 // backend is because if we had encountered an unrecoverable error we don't
925 // want to startup once more.
926 virtual void ReconfigureDatatypeManager();
927
928 // Collects preferred sync data types from |preference_providers_|. 928 // Collects preferred sync data types from |preference_providers_|.
929 syncer::ModelTypeSet GetDataTypesFromPreferenceProviders() const; 929 syncer::ModelTypeSet GetDataTypesFromPreferenceProviders() const;
930 930
931 // Called when the user changes the sync configuration, to update the UMA 931 // Called when the user changes the sync configuration, to update the UMA
932 // stats. 932 // stats.
933 void UpdateSelectedTypesHistogram( 933 void UpdateSelectedTypesHistogram(
934 bool sync_everything, 934 bool sync_everything,
935 const syncer::ModelTypeSet chosen_types) const; 935 const syncer::ModelTypeSet chosen_types) const;
936 936
937 #if defined(OS_CHROMEOS) 937 #if defined(OS_CHROMEOS)
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 scoped_ptr<base::Time> last_backup_time_; 1147 scoped_ptr<base::Time> last_backup_time_;
1148 1148
1149 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 1149 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
1150 }; 1150 };
1151 1151
1152 bool ShouldShowActionOnUI( 1152 bool ShouldShowActionOnUI(
1153 const syncer::SyncProtocolError& error); 1153 const syncer::SyncProtocolError& error);
1154 1154
1155 1155
1156 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 1156 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698