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

Side by Side Diff: components/sync/core/processor_entity_tracker_unittest.cc

Issue 2256733004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/sync/core/processor_entity_tracker.h" 5 #include "components/sync/core/processor_entity_tracker.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 update.response_version = version; 63 update.response_version = version;
64 return update; 64 return update;
65 } 65 }
66 66
67 UpdateResponseData GenerateTombstone(const ProcessorEntityTracker& entity, 67 UpdateResponseData GenerateTombstone(const ProcessorEntityTracker& entity,
68 const std::string& hash, 68 const std::string& hash,
69 const std::string& id, 69 const std::string& id,
70 const std::string& name, 70 const std::string& name,
71 const base::Time& mtime, 71 const base::Time& mtime,
72 int64_t version) { 72 int64_t version) {
73 std::unique_ptr<EntityData> data = base::WrapUnique(new EntityData()); 73 std::unique_ptr<EntityData> data = base::MakeUnique<EntityData>();
74 data->client_tag_hash = hash; 74 data->client_tag_hash = hash;
75 data->non_unique_name = name; 75 data->non_unique_name = name;
76 data->id = id; 76 data->id = id;
77 data->modification_time = mtime; 77 data->modification_time = mtime;
78 UpdateResponseData update; 78 UpdateResponseData update;
79 update.entity = data->PassToPtr(); 79 update.entity = data->PassToPtr();
80 update.response_version = version; 80 update.response_version = version;
81 return update; 81 return update;
82 } 82 }
83 83
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 EXPECT_EQ("", entity->metadata().base_specifics_hash()); 479 EXPECT_EQ("", entity->metadata().base_specifics_hash());
480 480
481 EXPECT_FALSE(entity->IsUnsynced()); 481 EXPECT_FALSE(entity->IsUnsynced());
482 EXPECT_FALSE(entity->RequiresCommitRequest()); 482 EXPECT_FALSE(entity->RequiresCommitRequest());
483 EXPECT_FALSE(entity->RequiresCommitData()); 483 EXPECT_FALSE(entity->RequiresCommitData());
484 EXPECT_FALSE(entity->CanClearMetadata()); 484 EXPECT_FALSE(entity->CanClearMetadata());
485 EXPECT_FALSE(entity->HasCommitData()); 485 EXPECT_FALSE(entity->HasCommitData());
486 } 486 }
487 487
488 } // namespace syncer_v2 488 } // namespace syncer_v2
OLDNEW
« no previous file with comments | « components/sync/core/model_type_store_impl.cc ('k') | components/sync/core/shared_model_type_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698