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

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

Issue 2751333007: [Sync] Try to fix race conditions in CookieJarMismatch. (Closed)
Patch Set: Created 3 years, 9 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 424
425 void SyncBackendHostImpl::ClearServerData( 425 void SyncBackendHostImpl::ClearServerData(
426 const SyncManager::ClearServerDataCallback& callback) { 426 const SyncManager::ClearServerDataCallback& callback) {
427 DCHECK(thread_checker_.CalledOnValidThread()); 427 DCHECK(thread_checker_.CalledOnValidThread());
428 sync_task_runner_->PostTask( 428 sync_task_runner_->PostTask(
429 FROM_HERE, 429 FROM_HERE,
430 base::Bind(&SyncBackendHostCore::DoClearServerData, core_, callback)); 430 base::Bind(&SyncBackendHostCore::DoClearServerData, core_, callback));
431 } 431 }
432 432
433 void SyncBackendHostImpl::OnCookieJarChanged(bool account_mismatch, 433 void SyncBackendHostImpl::OnCookieJarChanged(bool account_mismatch,
434 bool empty_jar) { 434 bool empty_jar,
435 const base::Closure& callback) {
435 DCHECK(thread_checker_.CalledOnValidThread()); 436 DCHECK(thread_checker_.CalledOnValidThread());
436 sync_task_runner_->PostTask( 437 sync_task_runner_->PostTask(
437 FROM_HERE, base::Bind(&SyncBackendHostCore::DoOnCookieJarChanged, core_, 438 FROM_HERE, base::Bind(&SyncBackendHostCore::DoOnCookieJarChanged, core_,
438 account_mismatch, empty_jar)); 439 account_mismatch, empty_jar, callback));
439 } 440 }
440 441
441 void SyncBackendHostImpl::ClearServerDataDoneOnFrontendLoop( 442 void SyncBackendHostImpl::ClearServerDataDoneOnFrontendLoop(
442 const SyncManager::ClearServerDataCallback& frontend_callback) { 443 const SyncManager::ClearServerDataCallback& frontend_callback) {
443 DCHECK(thread_checker_.CalledOnValidThread()); 444 DCHECK(thread_checker_.CalledOnValidThread());
444 frontend_callback.Run(); 445 frontend_callback.Run();
445 } 446 }
446 447
448 void SyncBackendHostImpl::OnCookieJarChangedDoneOnFrontendLoop(
449 const base::Closure& callback) {
450 DCHECK(thread_checker_.CalledOnValidThread());
451 callback.Run();
452 }
453
447 } // namespace syncer 454 } // namespace syncer
448 455
449 #undef SDVLOG 456 #undef SDVLOG
450 457
451 #undef SLOG 458 #undef SLOG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698