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

Side by Side Diff: components/sync/engine_impl/directory_update_handler_unittest.cc

Issue 2422253002: [Sync] Rewriting ".reset(new" pattern to use "= base::MakeUnique" instead. (Closed)
Patch Set: Fixing compile. Created 4 years, 2 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/engine_impl/directory_update_handler.h" 5 #include "components/sync/engine_impl/directory_update_handler.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 DirectoryUpdateHandlerApplyUpdateTest() 470 DirectoryUpdateHandlerApplyUpdateTest()
471 : ui_worker_(new FakeModelWorker(GROUP_UI)), 471 : ui_worker_(new FakeModelWorker(GROUP_UI)),
472 password_worker_(new FakeModelWorker(GROUP_PASSWORD)), 472 password_worker_(new FakeModelWorker(GROUP_PASSWORD)),
473 passive_worker_(new FakeModelWorker(GROUP_PASSIVE)), 473 passive_worker_(new FakeModelWorker(GROUP_PASSIVE)),
474 bookmarks_emitter_(BOOKMARKS, &type_observers_), 474 bookmarks_emitter_(BOOKMARKS, &type_observers_),
475 passwords_emitter_(PASSWORDS, &type_observers_), 475 passwords_emitter_(PASSWORDS, &type_observers_),
476 articles_emitter_(ARTICLES, &type_observers_) {} 476 articles_emitter_(ARTICLES, &type_observers_) {}
477 477
478 void SetUp() override { 478 void SetUp() override {
479 dir_maker_.SetUp(); 479 dir_maker_.SetUp();
480 entry_factory_.reset(new TestEntryFactory(directory())); 480 entry_factory_ = base::MakeUnique<TestEntryFactory>(directory());
481 481
482 update_handler_map_.insert(std::make_pair( 482 update_handler_map_.insert(std::make_pair(
483 BOOKMARKS, 483 BOOKMARKS,
484 base::MakeUnique<DirectoryUpdateHandler>( 484 base::MakeUnique<DirectoryUpdateHandler>(
485 directory(), BOOKMARKS, ui_worker_, &bookmarks_emitter_))); 485 directory(), BOOKMARKS, ui_worker_, &bookmarks_emitter_)));
486 update_handler_map_.insert(std::make_pair( 486 update_handler_map_.insert(std::make_pair(
487 PASSWORDS, 487 PASSWORDS,
488 base::MakeUnique<DirectoryUpdateHandler>( 488 base::MakeUnique<DirectoryUpdateHandler>(
489 directory(), PASSWORDS, password_worker_, &passwords_emitter_))); 489 directory(), PASSWORDS, password_worker_, &passwords_emitter_)));
490 update_handler_map_.insert(std::make_pair( 490 update_handler_map_.insert(std::make_pair(
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 const UpdateCounters& counters = GetArticlesUpdateCounters(); 1153 const UpdateCounters& counters = GetArticlesUpdateCounters();
1154 EXPECT_EQ(1, counters.num_updates_applied); 1154 EXPECT_EQ(1, counters.num_updates_applied);
1155 EXPECT_EQ(1, counters.num_local_overwrites); 1155 EXPECT_EQ(1, counters.num_local_overwrites);
1156 EXPECT_EQ(0, counters.num_server_overwrites); 1156 EXPECT_EQ(0, counters.num_server_overwrites);
1157 local_metadata = entry_factory()->GetLocalAttachmentMetadataForItem(handle); 1157 local_metadata = entry_factory()->GetLocalAttachmentMetadataForItem(handle);
1158 EXPECT_EQ(server_metadata.SerializeAsString(), 1158 EXPECT_EQ(server_metadata.SerializeAsString(),
1159 local_metadata.SerializeAsString()); 1159 local_metadata.SerializeAsString());
1160 } 1160 }
1161 1161
1162 } // namespace syncer 1162 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/directory_update_handler.cc ('k') | components/sync/engine_impl/model_type_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698