Chromium Code Reviews| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 ConflictResolutionPolicy | 183 ConflictResolutionPolicy |
| 184 SyncFileSystemService::GetConflictResolutionPolicy() const { | 184 SyncFileSystemService::GetConflictResolutionPolicy() const { |
| 185 return remote_file_service_->GetConflictResolutionPolicy(); | 185 return remote_file_service_->GetConflictResolutionPolicy(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 SyncStatusCode SyncFileSystemService::SetConflictResolutionPolicy( | 188 SyncStatusCode SyncFileSystemService::SetConflictResolutionPolicy( |
| 189 ConflictResolutionPolicy policy) { | 189 ConflictResolutionPolicy policy) { |
| 190 return remote_file_service_->SetConflictResolutionPolicy(policy); | 190 return remote_file_service_->SetConflictResolutionPolicy(policy); |
| 191 } | 191 } |
| 192 | 192 |
| 193 // static | |
| 194 std::string SyncFileSystemService::GetDefaultServiceName() { | |
| 195 return DriveFileSyncService::kServiceName; | |
|
kinuko
2013/05/29 14:12:20
Current service name (syncfs) is not even drive-sp
| |
| 196 } | |
| 197 | |
| 193 SyncFileSystemService::SyncFileSystemService(Profile* profile) | 198 SyncFileSystemService::SyncFileSystemService(Profile* profile) |
| 194 : profile_(profile), | 199 : profile_(profile), |
| 195 pending_local_changes_(0), | 200 pending_local_changes_(0), |
| 196 pending_remote_changes_(0), | 201 pending_remote_changes_(0), |
| 197 local_sync_running_(false), | 202 local_sync_running_(false), |
| 198 remote_sync_running_(false), | 203 remote_sync_running_(false), |
| 199 is_waiting_remote_sync_enabled_(false), | 204 is_waiting_remote_sync_enabled_(false), |
| 200 sync_enabled_(true) { | 205 sync_enabled_(true) { |
| 201 } | 206 } |
| 202 | 207 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 568 syncer::APPS); | 573 syncer::APPS); |
| 569 remote_file_service_->SetSyncEnabled(sync_enabled_); | 574 remote_file_service_->SetSyncEnabled(sync_enabled_); |
| 570 if (sync_enabled_) { | 575 if (sync_enabled_) { |
| 571 base::MessageLoopProxy::current()->PostTask( | 576 base::MessageLoopProxy::current()->PostTask( |
| 572 FROM_HERE, base::Bind(&SyncFileSystemService::MaybeStartSync, | 577 FROM_HERE, base::Bind(&SyncFileSystemService::MaybeStartSync, |
| 573 AsWeakPtr())); | 578 AsWeakPtr())); |
| 574 } | 579 } |
| 575 } | 580 } |
| 576 | 581 |
| 577 } // namespace sync_file_system | 582 } // namespace sync_file_system |
| OLD | NEW |