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

Unified Diff: components/sync/engine/attachments/in_memory_attachment_store.h

Issue 2915453002: Deprecate NonThreadSafe in components/sync in favor of SequenceChecker. (Closed)
Patch Set: fix comment 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/engine/attachments/in_memory_attachment_store.h
diff --git a/components/sync/engine/attachments/in_memory_attachment_store.h b/components/sync/engine/attachments/in_memory_attachment_store.h
index 831d647539a2b97698cac8d032fb03845a1b2551..e5f1e67fb60eb28b3c329029888dbe3123210e01 100644
--- a/components/sync/engine/attachments/in_memory_attachment_store.h
+++ b/components/sync/engine/attachments/in_memory_attachment_store.h
@@ -10,7 +10,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/sequence_checker.h"
#include "components/sync/engine/attachments/attachment_store_backend.h"
#include "components/sync/model/attachments/attachment.h"
#include "components/sync/model/attachments/attachment_id.h"
@@ -25,8 +25,7 @@ namespace syncer {
// An in-memory implementation of AttachmentStore used for testing.
// InMemoryAttachmentStore is not threadsafe, it lives on backend thread and
// posts callbacks with results on |callback_task_runner|.
-class InMemoryAttachmentStore : public AttachmentStoreBackend,
- public base::NonThreadSafe {
+class InMemoryAttachmentStore : public AttachmentStoreBackend {
public:
InMemoryAttachmentStore(
const scoped_refptr<base::SequencedTaskRunner>& callback_task_runner);
@@ -67,6 +66,8 @@ class InMemoryAttachmentStore : public AttachmentStoreBackend,
using AttachmentEntryMap = std::map<AttachmentId, AttachmentEntry>;
AttachmentEntryMap attachments_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(InMemoryAttachmentStore);
};

Powered by Google App Engine
This is Rietveld 408576698