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

Side by Side Diff: components/sync_driver/sync_prefs.h

Issue 1136763004: Add UMA data for memory pressure warning received for sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « components/sync_driver/pref_names.cc ('k') | components/sync_driver/sync_prefs.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 COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_
6 #define COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ 6 #define COMPONENTS_SYNC_DRIVER_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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void SetFirstSyncTime(base::Time time); 133 void SetFirstSyncTime(base::Time time);
134 void ClearFirstSyncTime(); 134 void ClearFirstSyncTime();
135 135
136 // Out of band sync passphrase prompt getter/setter. 136 // Out of band sync passphrase prompt getter/setter.
137 bool IsPassphrasePrompted() const; 137 bool IsPassphrasePrompted() const;
138 void SetPassphrasePrompted(bool value); 138 void SetPassphrasePrompted(bool value);
139 139
140 // For testing. 140 // For testing.
141 void SetManagedForTest(bool is_managed); 141 void SetManagedForTest(bool is_managed);
142 142
143 // Get/Set number of memory warnings received.
144 int GetMemoryPressureWarningCount() const;
145 void SetMemoryPressureWarningCount(int value);
146
147 // Check if the previous shutdown was clean.
148 bool DidSyncShutdownCleanly() const;
149
150 // Set whetherthe last shutdown was clean.
151 void SetCleanShutdown(bool value);
152
143 private: 153 private:
144 void RegisterPrefGroups(); 154 void RegisterPrefGroups();
145 155
146 static void RegisterDataTypePreferredPref( 156 static void RegisterDataTypePreferredPref(
147 user_prefs::PrefRegistrySyncable* prefs, 157 user_prefs::PrefRegistrySyncable* prefs,
148 syncer::ModelType type, 158 syncer::ModelType type,
149 bool is_preferred); 159 bool is_preferred);
150 bool GetDataTypePreferred(syncer::ModelType type) const; 160 bool GetDataTypePreferred(syncer::ModelType type) const;
151 void SetDataTypePreferred(syncer::ModelType type, bool is_preferred); 161 void SetDataTypePreferred(syncer::ModelType type, bool is_preferred);
152 162
(...skipping 22 matching lines...) Expand all
175 // etc. 185 // etc.
176 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; 186 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap;
177 PrefGroupsMap pref_groups_; 187 PrefGroupsMap pref_groups_;
178 188
179 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); 189 DISALLOW_COPY_AND_ASSIGN(SyncPrefs);
180 }; 190 };
181 191
182 } // namespace sync_driver 192 } // namespace sync_driver
183 193
184 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ 194 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_
OLDNEW
« no previous file with comments | « components/sync_driver/pref_names.cc ('k') | components/sync_driver/sync_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698