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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.cc

Issue 293003002: [SyncFS] Remove using MessageLoop in worker thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RemoteToLocalSyncer Created 6 years, 7 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 | Annotate | Revision Log
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 "chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h " 5 #include "chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h "
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 dirty_tracker_.get())) { 106 dirty_tracker_.get())) {
107 util::Log(logging::LOG_VERBOSE, FROM_HERE, 107 util::Log(logging::LOG_VERBOSE, FROM_HERE,
108 "[Remote -> Local] Start: tracker_id=%" PRId64, 108 "[Remote -> Local] Start: tracker_id=%" PRId64,
109 dirty_tracker_->tracker_id()); 109 dirty_tracker_->tracker_id());
110 ResolveRemoteChange(wrapped_callback); 110 ResolveRemoteChange(wrapped_callback);
111 return; 111 return;
112 } 112 }
113 113
114 util::Log(logging::LOG_VERBOSE, FROM_HERE, 114 util::Log(logging::LOG_VERBOSE, FROM_HERE,
115 "[Remote -> Local] Nothing to do."); 115 "[Remote -> Local] Nothing to do.");
116 base::MessageLoopProxy::current()->PostTask( 116 sync_context_->GetWorkerTaskRunner()->PostTask(
117 FROM_HERE, 117 FROM_HERE,
118 base::Bind(callback, SYNC_STATUS_NO_CHANGE_TO_SYNC)); 118 base::Bind(callback, SYNC_STATUS_NO_CHANGE_TO_SYNC));
119 } 119 }
120 120
121 void RemoteToLocalSyncer::ResolveRemoteChange( 121 void RemoteToLocalSyncer::ResolveRemoteChange(
122 const SyncStatusCallback& callback) { 122 const SyncStatusCallback& callback) {
123 DCHECK(dirty_tracker_); 123 DCHECK(dirty_tracker_);
124 remote_metadata_ = GetFileMetadata( 124 remote_metadata_ = GetFileMetadata(
125 metadata_database(), dirty_tracker_->file_id()); 125 metadata_database(), dirty_tracker_->file_id());
126 126
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 return sync_context_->GetMetadataDatabase(); 762 return sync_context_->GetMetadataDatabase();
763 } 763 }
764 764
765 RemoteChangeProcessor* RemoteToLocalSyncer::remote_change_processor() { 765 RemoteChangeProcessor* RemoteToLocalSyncer::remote_change_processor() {
766 DCHECK(sync_context_->GetRemoteChangeProcessor()); 766 DCHECK(sync_context_->GetRemoteChangeProcessor());
767 return sync_context_->GetRemoteChangeProcessor(); 767 return sync_context_->GetRemoteChangeProcessor();
768 } 768 }
769 769
770 } // namespace drive_backend 770 } // namespace drive_backend
771 } // namespace sync_file_system 771 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698