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

Side by Side Diff: services/preferences/persistent_pref_store_impl.h

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Created 3 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 SERVICES_PREFERENCES_PERSISTENT_PREF_STORE_IMPL_H_ 5 #ifndef SERVICES_PREFERENCES_PERSISTENT_PREF_STORE_IMPL_H_
6 #define SERVICES_PREFERENCES_PERSISTENT_PREF_STORE_IMPL_H_ 6 #define SERVICES_PREFERENCES_PERSISTENT_PREF_STORE_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 23 matching lines...) Expand all
34 bool initialized() { return !initializing_; } 34 bool initialized() { return !initializing_; }
35 35
36 private: 36 private:
37 class Connection; 37 class Connection;
38 38
39 void SetValues(std::vector<mojom::PrefUpdatePtr> updates); 39 void SetValues(std::vector<mojom::PrefUpdatePtr> updates);
40 40
41 void CommitPendingWrite(); 41 void CommitPendingWrite();
42 void SchedulePendingLossyWrites(); 42 void SchedulePendingLossyWrites();
43 void ClearMutableValues(); 43 void ClearMutableValues();
44 void CleanupForProfileDeletion();
44 45
45 // PrefStore::Observer: 46 // PrefStore::Observer:
46 void OnPrefValueChanged(const std::string& key) override; 47 void OnPrefValueChanged(const std::string& key) override;
47 void OnInitializationCompleted(bool succeeded) override; 48 void OnInitializationCompleted(bool succeeded) override;
48 49
49 void OnConnectionError(Connection* connection); 50 void OnConnectionError(Connection* connection);
50 51
51 scoped_refptr<PersistentPrefStore> backing_pref_store_; 52 scoped_refptr<PersistentPrefStore> backing_pref_store_;
52 53
53 bool initializing_ = false; 54 bool initializing_ = false;
54 55
55 std::unordered_map<Connection*, std::unique_ptr<Connection>> connections_; 56 std::unordered_map<Connection*, std::unique_ptr<Connection>> connections_;
56 57
57 base::OnceClosure on_initialized_; 58 base::OnceClosure on_initialized_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreImpl); 60 DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreImpl);
60 }; 61 };
61 62
62 } // namespace prefs 63 } // namespace prefs
63 64
64 #endif // SERVICES_PREFERENCES_PERSISTENT_PREF_STORE_IMPL_H_ 65 #endif // SERVICES_PREFERENCES_PERSISTENT_PREF_STORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698