| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 | 374 |
| 375 void SyncFileSystemService::AddSyncEventObserver(SyncEventObserver* observer) { | 375 void SyncFileSystemService::AddSyncEventObserver(SyncEventObserver* observer) { |
| 376 observers_.AddObserver(observer); | 376 observers_.AddObserver(observer); |
| 377 } | 377 } |
| 378 | 378 |
| 379 void SyncFileSystemService::RemoveSyncEventObserver( | 379 void SyncFileSystemService::RemoveSyncEventObserver( |
| 380 SyncEventObserver* observer) { | 380 SyncEventObserver* observer) { |
| 381 observers_.RemoveObserver(observer); | 381 observers_.RemoveObserver(observer); |
| 382 } | 382 } |
| 383 | 383 |
| 384 ConflictResolutionPolicy | 384 ConflictResolutionPolicy SyncFileSystemService::GetConflictResolutionPolicy( |
| 385 SyncFileSystemService::GetConflictResolutionPolicy() const { | 385 const GURL& origin) const { |
| 386 return remote_service_->GetConflictResolutionPolicy(); | 386 return remote_service_->GetConflictResolutionPolicy(origin); |
| 387 } | 387 } |
| 388 | 388 |
| 389 SyncStatusCode SyncFileSystemService::SetConflictResolutionPolicy( | 389 SyncStatusCode SyncFileSystemService::SetConflictResolutionPolicy( |
| 390 const GURL& origin, |
| 390 ConflictResolutionPolicy policy) { | 391 ConflictResolutionPolicy policy) { |
| 391 return remote_service_->SetConflictResolutionPolicy(policy); | 392 return remote_service_->SetConflictResolutionPolicy(origin, policy); |
| 392 } | 393 } |
| 393 | 394 |
| 394 LocalChangeProcessor* SyncFileSystemService::GetLocalChangeProcessor( | 395 LocalChangeProcessor* SyncFileSystemService::GetLocalChangeProcessor( |
| 395 const GURL& origin) { | 396 const GURL& origin) { |
| 396 return GetRemoteService(origin)->GetLocalChangeProcessor(); | 397 return GetRemoteService(origin)->GetLocalChangeProcessor(); |
| 397 } | 398 } |
| 398 | 399 |
| 399 SyncFileSystemService::SyncFileSystemService(Profile* profile) | 400 SyncFileSystemService::SyncFileSystemService(Profile* profile) |
| 400 : profile_(profile), | 401 : profile_(profile), |
| 401 sync_enabled_(true) { | 402 sync_enabled_(true) { |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 v2_remote_service_.get())); | 764 v2_remote_service_.get())); |
| 764 v2_remote_service_->AddServiceObserver(v2_remote_syncer.get()); | 765 v2_remote_service_->AddServiceObserver(v2_remote_syncer.get()); |
| 765 v2_remote_service_->AddFileStatusObserver(this); | 766 v2_remote_service_->AddFileStatusObserver(this); |
| 766 v2_remote_service_->SetRemoteChangeProcessor(local_service_.get()); | 767 v2_remote_service_->SetRemoteChangeProcessor(local_service_.get()); |
| 767 remote_sync_runners_.push_back(v2_remote_syncer.release()); | 768 remote_sync_runners_.push_back(v2_remote_syncer.release()); |
| 768 } | 769 } |
| 769 return v2_remote_service_.get(); | 770 return v2_remote_service_.get(); |
| 770 } | 771 } |
| 771 | 772 |
| 772 } // namespace sync_file_system | 773 } // namespace sync_file_system |
| OLD | NEW |