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

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

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Fix to get OSX-only ActiveProfileDeletedNextProfileDeletedToo test to pass Created 3 years, 5 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 25 matching lines...) Expand all
36 36
37 private: 37 private:
38 class Connection; 38 class Connection;
39 39
40 void SetValues(std::vector<mojom::PrefUpdatePtr> updates); 40 void SetValues(std::vector<mojom::PrefUpdatePtr> updates);
41 bool GetValue(const std::string& key, const base::Value** value) const; 41 bool GetValue(const std::string& key, const base::Value** value) const;
42 42
43 void CommitPendingWrite(base::OnceClosure done_callback); 43 void CommitPendingWrite(base::OnceClosure done_callback);
44 void SchedulePendingLossyWrites(); 44 void SchedulePendingLossyWrites();
45 void ClearMutableValues(); 45 void ClearMutableValues();
46 void OnStoreDeletionFromDisk();
46 47
47 // PrefStore::Observer: 48 // PrefStore::Observer:
48 void OnPrefValueChanged(const std::string& key) override; 49 void OnPrefValueChanged(const std::string& key) override;
49 void OnInitializationCompleted(bool succeeded) override; 50 void OnInitializationCompleted(bool succeeded) override;
50 51
51 void OnConnectionError(Connection* connection); 52 void OnConnectionError(Connection* connection);
52 53
53 scoped_refptr<PersistentPrefStore> backing_pref_store_; 54 scoped_refptr<PersistentPrefStore> backing_pref_store_;
54 55
55 bool initializing_ = false; 56 bool initializing_ = false;
56 57
57 std::unordered_map<Connection*, std::unique_ptr<Connection>> connections_; 58 std::unordered_map<Connection*, std::unique_ptr<Connection>> connections_;
58 59
59 base::OnceClosure on_initialized_; 60 base::OnceClosure on_initialized_;
60 61
61 DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreImpl); 62 DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreImpl);
62 }; 63 };
63 64
64 } // namespace prefs 65 } // namespace prefs
65 66
66 #endif // SERVICES_PREFERENCES_PERSISTENT_PREF_STORE_IMPL_H_ 67 #endif // SERVICES_PREFERENCES_PERSISTENT_PREF_STORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698