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

Side by Side Diff: components/sync_driver/glue/sync_backend_host_impl_unittest.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_driver/glue/sync_backend_host_impl.h" 5 #include "components/sync_driver/glue/sync_backend_host_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8
9 #include <cstddef> 8 #include <cstddef>
10 #include <map> 9 #include <map>
10 #include <utility>
11 11
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/files/scoped_temp_dir.h" 13 #include "base/files/scoped_temp_dir.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
17 #include "base/run_loop.h" 17 #include "base/run_loop.h"
18 #include "base/synchronization/waitable_event.h" 18 #include "base/synchronization/waitable_event.h"
19 #include "base/test/test_timeouts.h" 19 #include "base/test/test_timeouts.h"
20 #include "base/thread_task_runner_handle.h" 20 #include "base/thread_task_runner_handle.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 http_post_provider_factory_getter = 227 http_post_provider_factory_getter =
228 base::Bind(&syncer::NetworkResources::GetHttpPostProviderFactory, 228 base::Bind(&syncer::NetworkResources::GetHttpPostProviderFactory,
229 base::Unretained(network_resources_.get()), 229 base::Unretained(network_resources_.get()),
230 nullptr, 230 nullptr,
231 base::Bind(&EmptyNetworkTimeUpdate)); 231 base::Bind(&EmptyNetworkTimeUpdate));
232 backend_->Initialize( 232 backend_->Initialize(
233 &mock_frontend_, scoped_ptr<base::Thread>(), 233 &mock_frontend_, scoped_ptr<base::Thread>(),
234 base::ThreadTaskRunnerHandle::Get(), 234 base::ThreadTaskRunnerHandle::Get(),
235 base::ThreadTaskRunnerHandle::Get(), 235 base::ThreadTaskRunnerHandle::Get(),
236 syncer::WeakHandle<syncer::JsEventHandler>(), GURL(std::string()), 236 syncer::WeakHandle<syncer::JsEventHandler>(), GURL(std::string()),
237 std::string(), credentials_, true, fake_manager_factory_.Pass(), 237 std::string(), credentials_, true, std::move(fake_manager_factory_),
238 MakeWeakHandle(test_unrecoverable_error_handler_.GetWeakPtr()), 238 MakeWeakHandle(test_unrecoverable_error_handler_.GetWeakPtr()),
239 base::Closure(), http_post_provider_factory_getter, 239 base::Closure(), http_post_provider_factory_getter,
240 saved_nigori_state_.Pass()); 240 std::move(saved_nigori_state_));
241 base::RunLoop run_loop; 241 base::RunLoop run_loop;
242 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(FROM_HERE, 242 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(FROM_HERE,
243 run_loop.QuitClosure(), 243 run_loop.QuitClosure(),
244 TestTimeouts::action_timeout()); 244 TestTimeouts::action_timeout());
245 run_loop.Run(); 245 run_loop.Run();
246 // |fake_manager_factory_|'s fake_manager() is set on the sync 246 // |fake_manager_factory_|'s fake_manager() is set on the sync
247 // thread, but we can rely on the message loop barriers to 247 // thread, but we can rely on the message loop barriers to
248 // guarantee that we see the updated value. 248 // guarantee that we see the updated value.
249 DCHECK(fake_manager_); 249 DCHECK(fake_manager_);
250 } 250 }
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 EXPECT_EQ(invalidation_versions.size(), 850 EXPECT_EQ(invalidation_versions.size(),
851 persisted_invalidation_versions.size()); 851 persisted_invalidation_versions.size());
852 for (auto iter : persisted_invalidation_versions) { 852 for (auto iter : persisted_invalidation_versions) {
853 EXPECT_EQ(invalidation_versions[iter.first], iter.second); 853 EXPECT_EQ(invalidation_versions[iter.first], iter.second);
854 } 854 }
855 } 855 }
856 856
857 } // namespace 857 } // namespace
858 858
859 } // namespace browser_sync 859 } // namespace browser_sync
OLDNEW
« no previous file with comments | « components/sync_driver/glue/sync_backend_host_impl.cc ('k') | components/sync_driver/glue/sync_backend_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698