OLD | NEW |
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/sync_file_system_service.h" | 5 #include "chrome/browser/sync_file_system/sync_file_system_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 const SyncStatusCallback& callback) { | 49 const SyncStatusCallback& callback) { |
50 DCHECK(local_file_service_); | 50 DCHECK(local_file_service_); |
51 DCHECK(app_origin == app_origin.GetOrigin()); | 51 DCHECK(app_origin == app_origin.GetOrigin()); |
52 | 52 |
53 // TODO(kinuko,tzik): Instantiate the remote_file_service for the given | 53 // TODO(kinuko,tzik): Instantiate the remote_file_service for the given |
54 // |service_name| if it hasn't been initialized. | 54 // |service_name| if it hasn't been initialized. |
55 | 55 |
56 local_file_service_->MaybeInitializeFileSystemContext( | 56 local_file_service_->MaybeInitializeFileSystemContext( |
57 app_origin, service_name, file_system_context, callback); | 57 app_origin, service_name, file_system_context, callback); |
58 | 58 |
59 if (remote_file_service_) | 59 if (remote_file_service_) { |
60 remote_file_service_->RegisterOriginForTrackingChanges(app_origin); | 60 // TODO(tzik): Handle errors in the completion callback. |
| 61 remote_file_service_->RegisterOriginForTrackingChanges( |
| 62 app_origin, fileapi::SyncStatusCallback()); |
| 63 } |
61 } | 64 } |
62 | 65 |
63 void SyncFileSystemService::GetConflictFiles( | 66 void SyncFileSystemService::GetConflictFiles( |
64 const GURL& app_origin, | 67 const GURL& app_origin, |
65 const std::string& service_name, | 68 const std::string& service_name, |
66 const fileapi::SyncFileSetCallback& callback) { | 69 const fileapi::SyncFileSetCallback& callback) { |
67 DCHECK(app_origin == app_origin.GetOrigin()); | 70 DCHECK(app_origin == app_origin.GetOrigin()); |
68 | 71 |
69 // TODO(kinuko): Implement. | 72 // TODO(kinuko): Implement. |
70 NOTIMPLEMENTED(); | 73 NOTIMPLEMENTED(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 148 |
146 scoped_ptr<RemoteFileSyncService> remote_file_service; | 149 scoped_ptr<RemoteFileSyncService> remote_file_service; |
147 // TODO(tzik): Instantiate DriveFileSyncService. | 150 // TODO(tzik): Instantiate DriveFileSyncService. |
148 | 151 |
149 service->Initialize(local_file_service.Pass(), | 152 service->Initialize(local_file_service.Pass(), |
150 remote_file_service.Pass()); | 153 remote_file_service.Pass()); |
151 return service; | 154 return service; |
152 } | 155 } |
153 | 156 |
154 } // namespace sync_file_system | 157 } // namespace sync_file_system |
OLD | NEW |