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

Side by Side Diff: chrome/browser/sync_file_system/local_file_sync_service.cc

Issue 11421197: Implement SyncFileSystemService::GetFileSyncStatus method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: indent fix Created 8 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/sync_file_system/local_file_sync_service.h" 5 #include "chrome/browser/sync_file_system/local_file_sync_service.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/sync_file_system/local_change_processor.h" 8 #include "chrome/browser/sync_file_system/local_change_processor.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 DCHECK(!origin.is_empty()); 134 DCHECK(!origin.is_empty());
135 DCHECK(ContainsKey(origin_to_contexts_, origin)); 135 DCHECK(ContainsKey(origin_to_contexts_, origin));
136 136
137 sync_context_->GetFileForLocalSync( 137 sync_context_->GetFileForLocalSync(
138 origin_to_contexts_[origin], 138 origin_to_contexts_[origin],
139 base::Bind(&LocalFileSyncService::DidGetFileForLocalSync, 139 base::Bind(&LocalFileSyncService::DidGetFileForLocalSync,
140 AsWeakPtr(), processor)); 140 AsWeakPtr(), processor));
141 } 141 }
142 142
143 void LocalFileSyncService::HasPendingLocalChanges(
144 const fileapi::FileSystemURL& url,
145 const HasPendingLocalChangeCallback& callback) {
146 DCHECK(ContainsKey(origin_to_contexts_, url.origin()));
147 sync_context_->HasPendingLocalChanges(
148 origin_to_contexts_[url.origin()], url, callback);
149 }
150
143 void LocalFileSyncService::GetLocalFileMetadata( 151 void LocalFileSyncService::GetLocalFileMetadata(
144 const fileapi::FileSystemURL& url, 152 const fileapi::FileSystemURL& url,
145 const SyncFileMetadataCallback& callback) { 153 const SyncFileMetadataCallback& callback) {
146 DCHECK(ContainsKey(origin_to_contexts_, url.origin())); 154 DCHECK(ContainsKey(origin_to_contexts_, url.origin()));
147 sync_context_->GetFileMetadata(origin_to_contexts_[url.origin()], 155 sync_context_->GetFileMetadata(origin_to_contexts_[url.origin()],
148 url, callback); 156 url, callback);
149 } 157 }
150 158
151 void LocalFileSyncService::PrepareForProcessRemoteChange( 159 void LocalFileSyncService::PrepareForProcessRemoteChange(
152 const FileSystemURL& url, 160 const FileSystemURL& url,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 changes.front(), 283 changes.front(),
276 sync_file_info.local_file_path, 284 sync_file_info.local_file_path,
277 sync_file_info.metadata, 285 sync_file_info.metadata,
278 url, 286 url,
279 base::Bind(&LocalFileSyncService::ProcessNextChangeForURL, 287 base::Bind(&LocalFileSyncService::ProcessNextChangeForURL,
280 AsWeakPtr(), processor, sync_file_info, 288 AsWeakPtr(), processor, sync_file_info,
281 changes.front(), changes.PopAndGetNewList())); 289 changes.front(), changes.PopAndGetNewList()));
282 } 290 }
283 291
284 } // namespace sync_file_system 292 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698