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

Side by Side Diff: components/sync/driver/glue/sync_backend_host_impl_unittest.cc

Issue 2442453002: [Sync] Adds a new switch for enabling the new local server backend. (Closed)
Patch Set: Fix InitArgs contructor. Created 4 years, 1 month 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 <cstddef> 7 #include <cstddef>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 .WillOnce(InvokeWithoutArgs(QuitMessageLoop)); 208 .WillOnce(InvokeWithoutArgs(QuitMessageLoop));
209 SyncBackendHost::HttpPostProviderFactoryGetter 209 SyncBackendHost::HttpPostProviderFactoryGetter
210 http_post_provider_factory_getter = 210 http_post_provider_factory_getter =
211 base::Bind(&NetworkResources::GetHttpPostProviderFactory, 211 base::Bind(&NetworkResources::GetHttpPostProviderFactory,
212 base::Unretained(network_resources_.get()), nullptr, 212 base::Unretained(network_resources_.get()), nullptr,
213 base::Bind(&EmptyNetworkTimeUpdate)); 213 base::Bind(&EmptyNetworkTimeUpdate));
214 backend_->Initialize( 214 backend_->Initialize(
215 &mock_frontend_, std::unique_ptr<base::Thread>(), 215 &mock_frontend_, std::unique_ptr<base::Thread>(),
216 base::ThreadTaskRunnerHandle::Get(), 216 base::ThreadTaskRunnerHandle::Get(),
217 base::ThreadTaskRunnerHandle::Get(), WeakHandle<JsEventHandler>(), 217 base::ThreadTaskRunnerHandle::Get(), WeakHandle<JsEventHandler>(),
218 GURL(std::string()), std::string(), credentials_, true, 218 GURL(std::string()), std::string(), credentials_, true, false,
219 std::move(fake_manager_factory_), 219 base::FilePath(), std::move(fake_manager_factory_),
220 MakeWeakHandle(test_unrecoverable_error_handler_.GetWeakPtr()), 220 MakeWeakHandle(test_unrecoverable_error_handler_.GetWeakPtr()),
221 base::Closure(), http_post_provider_factory_getter, 221 base::Closure(), http_post_provider_factory_getter,
222 std::move(saved_nigori_state_)); 222 std::move(saved_nigori_state_));
223 base::RunLoop run_loop; 223 base::RunLoop run_loop;
224 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 224 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
225 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::action_timeout()); 225 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::action_timeout());
226 run_loop.Run(); 226 run_loop.Run();
227 // |fake_manager_factory_|'s fake_manager() is set on the sync 227 // |fake_manager_factory_|'s fake_manager() is set on the sync
228 // thread, but we can rely on the message loop barriers to 228 // thread, but we can rely on the message loop barriers to
229 // guarantee that we see the updated value. 229 // guarantee that we see the updated value.
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 backend_->StopSyncingForShutdown(); 830 backend_->StopSyncingForShutdown();
831 // Verify that call to DeactivateNonBlockingDataType doesn't assert. 831 // Verify that call to DeactivateNonBlockingDataType doesn't assert.
832 backend_->DeactivateNonBlockingDataType(AUTOFILL); 832 backend_->DeactivateNonBlockingDataType(AUTOFILL);
833 backend_->Shutdown(STOP_SYNC); 833 backend_->Shutdown(STOP_SYNC);
834 backend_.reset(); 834 backend_.reset();
835 } 835 }
836 836
837 } // namespace 837 } // namespace
838 838
839 } // namespace syncer 839 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.cc ('k') | components/sync/driver/glue/sync_backend_host_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698