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

Side by Side Diff: services/preferences/public/cpp/tests/persistent_pref_store_client_unittest.cc

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 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 #include "services/preferences/public/cpp/persistent_pref_store_client.h" 5 #include "services/preferences/public/cpp/persistent_pref_store_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 private: 86 private:
87 void SetValues(std::vector<mojom::PrefUpdatePtr> updates) override { 87 void SetValues(std::vector<mojom::PrefUpdatePtr> updates) override {
88 last_updates_ = std::move(updates); 88 last_updates_ = std::move(updates);
89 if (on_update_) 89 if (on_update_)
90 std::move(on_update_).Run(); 90 std::move(on_update_).Run();
91 } 91 }
92 92
93 void CommitPendingWrite() override {} 93 void CommitPendingWrite() override {}
94 void SchedulePendingLossyWrites() override {} 94 void SchedulePendingLossyWrites() override {}
95 void ClearMutableValues() override {} 95 void ClearMutableValues() override {}
96 void CleanupForProfileDeletion() override {}
96 97
97 base::MessageLoop message_loop_; 98 base::MessageLoop message_loop_;
98 99
99 std::unique_ptr<PrefService> pref_service_; 100 std::unique_ptr<PrefService> pref_service_;
100 101
101 mojo::Binding<mojom::PersistentPrefStore> binding_; 102 mojo::Binding<mojom::PersistentPrefStore> binding_;
102 103
103 std::vector<mojom::PrefUpdatePtr> last_updates_; 104 std::vector<mojom::PrefUpdatePtr> last_updates_;
104 base::OnceClosure on_update_; 105 base::OnceClosure on_update_;
105 106
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 494 }
494 auto update = WaitForUpdate(); 495 auto update = WaitForUpdate();
495 ASSERT_TRUE(update->is_atomic_update()); 496 ASSERT_TRUE(update->is_atomic_update());
496 base::DictionaryValue expected_value; 497 base::DictionaryValue expected_value;
497 expected_value.SetInteger("path.to.integer", 1); 498 expected_value.SetInteger("path.to.integer", 1);
498 EXPECT_EQ(expected_value, *update->get_atomic_update()); 499 EXPECT_EQ(expected_value, *update->get_atomic_update());
499 } 500 }
500 501
501 } // namespace 502 } // namespace
502 } // namespace prefs 503 } // namespace prefs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698