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

Unified Diff: components/sync/syncable/mutable_entry.h

Issue 2844333003: [Sync] Address use-after-free in Directory::InsertEntry (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « components/sync/syncable/model_neutral_mutable_entry.cc ('k') | components/sync/syncable/mutable_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/mutable_entry.h
diff --git a/components/sync/syncable/mutable_entry.h b/components/sync/syncable/mutable_entry.h
index 55cb8659bc1fec1b00ea669ffc10d5800d329f9d..104b78cf78da1581357a5018c6eec01b3cde3240 100644
--- a/components/sync/syncable/mutable_entry.h
+++ b/components/sync/syncable/mutable_entry.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/macros.h"
@@ -26,11 +27,6 @@ class WriteTransaction;
// A mutable meta entry. Changes get committed to the database when the
// WriteTransaction is destroyed.
class MutableEntry : public ModelNeutralMutableEntry {
- void Init(WriteTransaction* trans,
- ModelType model_type,
- const Id& parent_id,
- const std::string& name);
-
public:
MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id);
MutableEntry(WriteTransaction* trans,
@@ -77,6 +73,12 @@ class MutableEntry : public ModelNeutralMutableEntry {
const sync_pb::AttachmentIdProto& attachment_id);
private:
+ static std::unique_ptr<EntryKernel> CreateEntryKernel(
+ WriteTransaction* trans,
+ ModelType model_type,
+ const Id& parent_id,
+ const std::string& name);
+
// Kind of redundant. We should reduce the number of pointers
// floating around if at all possible. Could we store this in Directory?
// Scope: Set on construction, never changed after that.
« no previous file with comments | « components/sync/syncable/model_neutral_mutable_entry.cc ('k') | components/sync/syncable/mutable_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698