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

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: Made documentation clearer. Created 6 years, 2 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // ProfileSyncService uses this to determine if it's OK to start syncing, or 471 // ProfileSyncService uses this to determine if it's OK to start syncing, or
472 // if the user is still setting up the initial sync configuration. 472 // if the user is still setting up the initial sync configuration.
473 virtual bool FirstSetupInProgress() const; 473 virtual bool FirstSetupInProgress() const;
474 474
475 // Called by the UI to notify the ProfileSyncService that UI is visible so it 475 // Called by the UI to notify the ProfileSyncService that UI is visible so it
476 // will not start syncing. This tells sync whether it's safe to start 476 // will not start syncing. This tells sync whether it's safe to start
477 // downloading data types yet (we don't start syncing until after sync setup 477 // downloading data types yet (we don't start syncing until after sync setup
478 // is complete). The UI calls this as soon as any part of the signin wizard is 478 // is complete). The UI calls this as soon as any part of the signin wizard is
479 // displayed (even just the login UI). 479 // displayed (even just the login UI).
480 // If |setup_in_progress| is false, this also kicks the sync engine to ensure 480 // If |setup_in_progress| is false, this also kicks the sync engine to ensure
481 // that data download starts. 481 // that data download starts. In this case, |ReconfigureDatatypeManager| will
482 // get triggered.
482 virtual void SetSetupInProgress(bool setup_in_progress); 483 virtual void SetSetupInProgress(bool setup_in_progress);
483 484
485 // Reconfigures the data type manager with the latest enabled types.
486 // Note: Does not initialize the backend if it is not already initialized.
487 // This function needs to be called only after sync has been initialized
488 // (i.e.,only for reconfigurations). The reason we don't initialize the
489 // backend is because if we had encountered an unrecoverable error we don't
490 // want to startup once more.
491 // This function is called by |SetSetupInProgress|.
492 virtual void ReconfigureDatatypeManager();
493
484 // Returns true if the SyncBackendHost has told us it's ready to accept 494 // Returns true if the SyncBackendHost has told us it's ready to accept
485 // changes. 495 // changes.
486 // [REMARK] - it is safe to call this function only from the ui thread. 496 // [REMARK] - it is safe to call this function only from the ui thread.
487 // because the variable is not thread safe and should only be accessed from 497 // because the variable is not thread safe and should only be accessed from
488 // single thread. If we want multiple threads to access this(and there is 498 // single thread. If we want multiple threads to access this(and there is
489 // currently no need to do so) we need to protect this with a lock. 499 // currently no need to do so) we need to protect this with a lock.
490 // TODO(timsteele): What happens if the bookmark model is loaded, a change 500 // TODO(timsteele): What happens if the bookmark model is loaded, a change
491 // takes place, and the backend isn't initialized yet? 501 // takes place, and the backend isn't initialized yet?
492 virtual bool sync_initialized() const; 502 virtual bool sync_initialized() const;
493 503
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 virtual void StartUpSlowBackendComponents(BackendMode mode); 914 virtual void StartUpSlowBackendComponents(BackendMode mode);
905 915
906 // About-flags experiment names for datatypes that aren't enabled by default 916 // About-flags experiment names for datatypes that aren't enabled by default
907 // yet. 917 // yet.
908 static std::string GetExperimentNameForDataType( 918 static std::string GetExperimentNameForDataType(
909 syncer::ModelType data_type); 919 syncer::ModelType data_type);
910 920
911 // Create and register a new datatype controller. 921 // Create and register a new datatype controller.
912 void RegisterNewDataType(syncer::ModelType data_type); 922 void RegisterNewDataType(syncer::ModelType data_type);
913 923
914 // Reconfigures the data type manager with the latest enabled types.
915 // Note: Does not initialize the backend if it is not already initialized.
916 // This function needs to be called only after sync has been initialized
917 // (i.e.,only for reconfigurations). The reason we don't initialize the
918 // backend is because if we had encountered an unrecoverable error we don't
919 // want to startup once more.
920 virtual void ReconfigureDatatypeManager();
921
922 // Collects preferred sync data types from |preference_providers_|. 924 // Collects preferred sync data types from |preference_providers_|.
923 syncer::ModelTypeSet GetDataTypesFromPreferenceProviders() const; 925 syncer::ModelTypeSet GetDataTypesFromPreferenceProviders() const;
924 926
925 // Called when the user changes the sync configuration, to update the UMA 927 // Called when the user changes the sync configuration, to update the UMA
926 // stats. 928 // stats.
927 void UpdateSelectedTypesHistogram( 929 void UpdateSelectedTypesHistogram(
928 bool sync_everything, 930 bool sync_everything,
929 const syncer::ModelTypeSet chosen_types) const; 931 const syncer::ModelTypeSet chosen_types) const;
930 932
931 #if defined(OS_CHROMEOS) 933 #if defined(OS_CHROMEOS)
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 BrowsingDataRemover::Observer* browsing_data_remover_observer_; 1159 BrowsingDataRemover::Observer* browsing_data_remover_observer_;
1158 1160
1159 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 1161 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
1160 }; 1162 };
1161 1163
1162 bool ShouldShowActionOnUI( 1164 bool ShouldShowActionOnUI(
1163 const syncer::SyncProtocolError& error); 1165 const syncer::SyncProtocolError& error);
1164 1166
1165 1167
1166 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 1168 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_service_unittest.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698