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

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

Issue 11234025: Add skeleton code to wire Local- and Remote- file sync services (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | 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 "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "webkit/fileapi/file_system_url.h"
10 #include "webkit/fileapi/syncable/file_change.h"
9 #include "webkit/fileapi/syncable/local_file_sync_context.h" 11 #include "webkit/fileapi/syncable/local_file_sync_context.h"
10 12
11 using content::BrowserThread; 13 using content::BrowserThread;
12 14
13 namespace sync_file_system { 15 namespace sync_file_system {
14 16
15 LocalFileSyncService::LocalFileSyncService() 17 LocalFileSyncService::LocalFileSyncService()
16 : sync_context_(new fileapi::LocalFileSyncContext( 18 : sync_context_(new fileapi::LocalFileSyncContext(
17 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 19 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
18 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))) { 20 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))) {
19 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
20 } 22 }
21 23
22 LocalFileSyncService::~LocalFileSyncService() { 24 LocalFileSyncService::~LocalFileSyncService() {
23 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
24 } 26 }
25 27
26 void LocalFileSyncService::Shutdown() { 28 void LocalFileSyncService::Shutdown() {
27 sync_context_->ShutdownOnUIThread(); 29 sync_context_->ShutdownOnUIThread();
28 } 30 }
29 31
30 void LocalFileSyncService::MaybeInitializeFileSystemContext( 32 void LocalFileSyncService::MaybeInitializeFileSystemContext(
31 const GURL& app_url, 33 const GURL& app_url,
32 fileapi::FileSystemContext* file_system_context, 34 fileapi::FileSystemContext* file_system_context,
33 const StatusCallback& callback) { 35 const StatusCallback& callback) {
34 sync_context_->MaybeInitializeFileSystemContext( 36 sync_context_->MaybeInitializeFileSystemContext(
35 app_url, file_system_context, callback); 37 app_url, file_system_context, callback);
36 } 38 }
37 39
40 void LocalFileSyncService::ProcessChange(
41 LocalChangeProcessor* processor,
42 const SyncCompletionCallback& callback) {
43 // TODO(kinuko): implement.
44 NOTIMPLEMENTED();
45 }
46
47 void LocalFileSyncService::PrepareForProcessRemoteChange(
48 const fileapi::FileSystemURL& url,
49 const PrepareChangeCallback& callback) {
50 // TODO(kinuko): implement.
51 NOTIMPLEMENTED();
52 }
53
54 void LocalFileSyncService::ApplyRemoteChange(
55 const fileapi::FileChange& change,
56 const FilePath& local_path,
57 const fileapi::FileSystemURL& url,
58 const StatusCallback& callback) {
59 // TODO(kinuko): implement.
60 NOTIMPLEMENTED();
61 }
62
38 } // namespace sync_file_system 63 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/local_file_sync_service.h ('k') | chrome/browser/sync_file_system/remote_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698