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

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: Update comments Created 3 years, 4 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void RequestValue(const std::string& key, 92 void RequestValue(const std::string& key,
93 const std::vector<std::string>& path) override {} 93 const std::vector<std::string>& path) override {}
94 94
95 void CommitPendingWrite(CommitPendingWriteCallback callback) override { 95 void CommitPendingWrite(CommitPendingWriteCallback callback) override {
96 base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE, 96 base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE,
97 std::move(callback)); 97 std::move(callback));
98 } 98 }
99 99
100 void SchedulePendingLossyWrites() override {} 100 void SchedulePendingLossyWrites() override {}
101 void ClearMutableValues() override {} 101 void ClearMutableValues() override {}
102 void OnStoreDeletionFromDisk() override {}
102 103
103 base::MessageLoop message_loop_; 104 base::MessageLoop message_loop_;
104 105
105 std::unique_ptr<PrefService> pref_service_; 106 std::unique_ptr<PrefService> pref_service_;
106 107
107 mojo::Binding<mojom::PersistentPrefStore> binding_; 108 mojo::Binding<mojom::PersistentPrefStore> binding_;
108 109
109 std::vector<mojom::PrefUpdatePtr> last_updates_; 110 std::vector<mojom::PrefUpdatePtr> last_updates_;
110 base::OnceClosure on_update_; 111 base::OnceClosure on_update_;
111 112
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 auto update = WaitForUpdate(); 487 auto update = WaitForUpdate();
487 ASSERT_TRUE(update->is_split_updates()); 488 ASSERT_TRUE(update->is_split_updates());
488 auto& split_updates = update->get_split_updates(); 489 auto& split_updates = update->get_split_updates();
489 ASSERT_EQ(1u, split_updates.size()); 490 ASSERT_EQ(1u, split_updates.size());
490 EXPECT_EQ(base::Value(2), *split_updates[0]->value); 491 EXPECT_EQ(base::Value(2), *split_updates[0]->value);
491 EXPECT_EQ((std::vector<std::string>{"path"}), split_updates[0]->path); 492 EXPECT_EQ((std::vector<std::string>{"path"}), split_updates[0]->path);
492 } 493 }
493 494
494 } // namespace 495 } // namespace
495 } // namespace prefs 496 } // namespace prefs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698