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

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

Issue 14655009: Client changes for disabled dasher account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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_SYNC_PREFS_H_ 5 #ifndef CHROME_BROWSER_SYNC_SYNC_PREFS_H_
6 #define CHROME_BROWSER_SYNC_SYNC_PREFS_H_ 6 #define CHROME_BROWSER_SYNC_SYNC_PREFS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public: 49 public:
50 // |pref_service| may be NULL (for unit tests), but in that case no 50 // |pref_service| may be NULL (for unit tests), but in that case no
51 // setter methods should be called. Does not take ownership of 51 // setter methods should be called. Does not take ownership of
52 // |pref_service|. 52 // |pref_service|.
53 explicit SyncPrefs(PrefService* pref_service); 53 explicit SyncPrefs(PrefService* pref_service);
54 54
55 virtual ~SyncPrefs(); 55 virtual ~SyncPrefs();
56 56
57 static void RegisterUserPrefs(PrefRegistrySyncable* registry); 57 static void RegisterUserPrefs(PrefRegistrySyncable* registry);
58 58
59 // Checks if sync is enabled for the profile that owns |io_data|. This must
60 // be invoked on the IO thread, and can be used to check if sync is enabled
61 // on that thread.
62 static bool IsSyncAccessibleOnIOThread(ProfileIOData* io_data);
63
64 void AddSyncPrefObserver(SyncPrefObserver* sync_pref_observer); 59 void AddSyncPrefObserver(SyncPrefObserver* sync_pref_observer);
65 void RemoveSyncPrefObserver(SyncPrefObserver* sync_pref_observer); 60 void RemoveSyncPrefObserver(SyncPrefObserver* sync_pref_observer);
66 61
67 // Clears important sync preferences. 62 // Clears important sync preferences.
68 void ClearPreferences(); 63 void ClearPreferences();
69 64
70 // Getters and setters for global sync prefs. 65 // Getters and setters for global sync prefs.
71 66
72 bool HasSyncSetupCompleted() const; 67 bool HasSyncSetupCompleted() const;
73 void SetSyncSetupCompleted(); 68 void SetSyncSetupCompleted();
(...skipping 20 matching lines...) Expand all
94 // Changes are still made to the prefs even if 89 // Changes are still made to the prefs even if
95 // HasKeepEverythingSynced() is true, but won't be visible until 90 // HasKeepEverythingSynced() is true, but won't be visible until
96 // SetKeepEverythingSynced(false) is called. 91 // SetKeepEverythingSynced(false) is called.
97 void SetPreferredDataTypes( 92 void SetPreferredDataTypes(
98 syncer::ModelTypeSet registered_types, 93 syncer::ModelTypeSet registered_types,
99 syncer::ModelTypeSet preferred_types); 94 syncer::ModelTypeSet preferred_types);
100 95
101 // This pref is set outside of sync. 96 // This pref is set outside of sync.
102 bool IsManaged() const; 97 bool IsManaged() const;
103 98
99 bool IsSyncDisabledByAdmin() const;
Andrew T Wilson (Slow) 2013/05/13 11:51:13 See my previous comment - I don't think this shoul
pavely 2013/05/13 22:37:09 Done.
100 void SetSyncDisabledByAdmin(bool value);
101
104 // Use this encryption bootstrap token if we're using an explicit passphrase. 102 // Use this encryption bootstrap token if we're using an explicit passphrase.
105 std::string GetEncryptionBootstrapToken() const; 103 std::string GetEncryptionBootstrapToken() const;
106 void SetEncryptionBootstrapToken(const std::string& token); 104 void SetEncryptionBootstrapToken(const std::string& token);
107 105
108 // Use this keystore bootstrap token if we're not using an explicit 106 // Use this keystore bootstrap token if we're not using an explicit
109 // passphrase. 107 // passphrase.
110 std::string GetKeystoreEncryptionBootstrapToken() const; 108 std::string GetKeystoreEncryptionBootstrapToken() const;
111 void SetKeystoreEncryptionBootstrapToken(const std::string& token); 109 void SetKeystoreEncryptionBootstrapToken(const std::string& token);
112 110
113 // Use this for the unique machine tag used for session sync. 111 // Use this for the unique machine tag used for session sync.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // etc. 164 // etc.
167 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; 165 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap;
168 PrefGroupsMap pref_groups_; 166 PrefGroupsMap pref_groups_;
169 167
170 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); 168 DISALLOW_COPY_AND_ASSIGN(SyncPrefs);
171 }; 169 };
172 170
173 } // namespace browser_sync 171 } // namespace browser_sync
174 172
175 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ 173 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698