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

Side by Side Diff: sync/engine/syncer_unittest.cc

Issue 503903002: Remove implicit conversions from scoped_refptr to T* in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 // Syncer unit tests. Unfortunately a lot of these tests 5 // Syncer unit tests. Unfortunately a lot of these tests
6 // are outdated and need to be reworked and updated. 6 // are outdated and need to be reworked and updated.
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <limits> 9 #include <limits>
10 #include <list> 10 #include <list>
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 listeners.push_back(this); 299 listeners.push_back(this);
300 300
301 ModelSafeRoutingInfo routing_info; 301 ModelSafeRoutingInfo routing_info;
302 GetModelSafeRoutingInfo(&routing_info); 302 GetModelSafeRoutingInfo(&routing_info);
303 303
304 model_type_registry_.reset( 304 model_type_registry_.reset(
305 new ModelTypeRegistry(workers_, directory(), &mock_nudge_handler_)); 305 new ModelTypeRegistry(workers_, directory(), &mock_nudge_handler_));
306 model_type_registry_->RegisterDirectoryTypeDebugInfoObserver( 306 model_type_registry_->RegisterDirectoryTypeDebugInfoObserver(
307 &debug_info_cache_); 307 &debug_info_cache_);
308 308
309 context_.reset( 309 context_.reset(new SyncSessionContext(
310 new SyncSessionContext( 310 mock_server_.get(),
311 mock_server_.get(), directory(), 311 directory(),
312 extensions_activity_, 312 extensions_activity_.get(),
313 listeners, debug_info_getter_.get(), 313 listeners,
314 model_type_registry_.get(), 314 debug_info_getter_.get(),
315 true, // enable keystore encryption 315 model_type_registry_.get(),
316 false, // force enable pre-commit GU avoidance experiment 316 true, // enable keystore encryption
317 "fake_invalidator_client_id")); 317 false, // force enable pre-commit GU avoidance experiment
318 "fake_invalidator_client_id"));
318 context_->SetRoutingInfo(routing_info); 319 context_->SetRoutingInfo(routing_info);
319 syncer_ = new Syncer(&cancelation_signal_); 320 syncer_ = new Syncer(&cancelation_signal_);
320 321
321 syncable::ReadTransaction trans(FROM_HERE, directory()); 322 syncable::ReadTransaction trans(FROM_HERE, directory());
322 syncable::Directory::Metahandles children; 323 syncable::Directory::Metahandles children;
323 directory()->GetChildHandlesById(&trans, trans.root_id(), &children); 324 directory()->GetChildHandlesById(&trans, trans.root_id(), &children);
324 ASSERT_EQ(0u, children.size()); 325 ASSERT_EQ(0u, children.size());
325 saw_syncer_event_ = false; 326 saw_syncer_event_ = false;
326 root_id_ = TestIdFactory::root(); 327 root_id_ = TestIdFactory::root();
327 parent_id_ = ids_.MakeServer("parent id"); 328 parent_id_ = ids_.MakeServer("parent id");
(...skipping 4720 matching lines...) Expand 10 before | Expand all | Expand 10 after
5048 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); 5049 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id);
5049 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); 5050 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count);
5050 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); 5051 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count);
5051 } else { 5052 } else {
5052 EXPECT_TRUE(final_monitor_records.empty()) 5053 EXPECT_TRUE(final_monitor_records.empty())
5053 << "Should not restore records after successful bookmark commit."; 5054 << "Should not restore records after successful bookmark commit.";
5054 } 5055 }
5055 } 5056 }
5056 5057
5057 } // namespace syncer 5058 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/api/attachments/attachment.cc ('k') | sync/internal_api/attachments/attachment_downloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698