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

Side by Side Diff: components/prefs/overlay_user_pref_store.h

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Created 3 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
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_PREFS_OVERLAY_USER_PREF_STORE_H_ 5 #ifndef COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_
6 #define COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_ 6 #define COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void SchedulePendingLossyWrites() override; 57 void SchedulePendingLossyWrites() override;
58 void ReportValueChanged(const std::string& key, uint32_t flags) override; 58 void ReportValueChanged(const std::string& key, uint32_t flags) override;
59 59
60 // Methods of PrefStore::Observer. 60 // Methods of PrefStore::Observer.
61 void OnPrefValueChanged(const std::string& key) override; 61 void OnPrefValueChanged(const std::string& key) override;
62 void OnInitializationCompleted(bool succeeded) override; 62 void OnInitializationCompleted(bool succeeded) override;
63 63
64 void RegisterOverlayPref(const std::string& key); 64 void RegisterOverlayPref(const std::string& key);
65 65
66 void ClearMutableValues() override; 66 void ClearMutableValues() override;
67 void CleanupForProfileDeletion() override;
67 68
68 protected: 69 protected:
69 ~OverlayUserPrefStore() override; 70 ~OverlayUserPrefStore() override;
70 71
71 private: 72 private:
72 typedef std::set<std::string> NamesSet; 73 typedef std::set<std::string> NamesSet;
73 74
74 // Returns true if |key| corresponds to a preference that shall be stored in 75 // Returns true if |key| corresponds to a preference that shall be stored in
75 // an in-memory PrefStore that is not persisted to disk. 76 // an in-memory PrefStore that is not persisted to disk.
76 bool ShallBeStoredInOverlay(const std::string& key) const; 77 bool ShallBeStoredInOverlay(const std::string& key) const;
77 78
78 base::ObserverList<PrefStore::Observer, true> observers_; 79 base::ObserverList<PrefStore::Observer, true> observers_;
79 PrefValueMap overlay_; 80 PrefValueMap overlay_;
80 scoped_refptr<PersistentPrefStore> underlay_; 81 scoped_refptr<PersistentPrefStore> underlay_;
81 NamesSet overlay_names_set_; 82 NamesSet overlay_names_set_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(OverlayUserPrefStore); 84 DISALLOW_COPY_AND_ASSIGN(OverlayUserPrefStore);
84 }; 85 };
85 86
86 #endif // COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_ 87 #endif // COMPONENTS_PREFS_OVERLAY_USER_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698