Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_factory.h" | 5 #include "chrome/browser/sync_file_system/sync_file_system_service_factory.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/drive/drive_notification_manager_factory.h" | 8 #include "chrome/browser/drive/drive_notification_manager_factory.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 | 54 |
| 55 SyncFileSystemService* service = new SyncFileSystemService(profile); | 55 SyncFileSystemService* service = new SyncFileSystemService(profile); |
| 56 | 56 |
| 57 scoped_ptr<LocalFileSyncService> local_file_service( | 57 scoped_ptr<LocalFileSyncService> local_file_service( |
| 58 new LocalFileSyncService(profile)); | 58 new LocalFileSyncService(profile)); |
| 59 | 59 |
| 60 scoped_ptr<RemoteFileSyncService> remote_file_service; | 60 scoped_ptr<RemoteFileSyncService> remote_file_service; |
| 61 if (mock_remote_file_service_) { | 61 if (mock_remote_file_service_) { |
| 62 remote_file_service = mock_remote_file_service_.Pass(); | 62 remote_file_service = mock_remote_file_service_.Pass(); |
| 63 } else { | 63 } else { |
| 64 // FileSystem needs to be registered before DriveFileSyncService runs | |
| 65 // its initialization code. | |
| 66 RegisterSyncableFileSystem(); | |
|
tzik
2013/09/05 09:30:26
I added RegisterSyncableFileSystem call around her
nhiroki
2013/09/09 09:51:05
Done.
| |
| 67 remote_file_service = | 64 remote_file_service = |
| 68 DriveFileSyncService::Create(profile).PassAs<RemoteFileSyncService>(); | 65 DriveFileSyncService::Create(profile).PassAs<RemoteFileSyncService>(); |
| 69 } | 66 } |
| 70 | 67 |
| 71 if (CommandLine::ForCurrentProcess()->HasSwitch(kDisableLastWriteWin)) { | 68 if (CommandLine::ForCurrentProcess()->HasSwitch(kDisableLastWriteWin)) { |
| 72 remote_file_service->SetConflictResolutionPolicy( | 69 remote_file_service->SetConflictResolutionPolicy( |
| 73 CONFLICT_RESOLUTION_POLICY_MANUAL); | 70 CONFLICT_RESOLUTION_POLICY_MANUAL); |
| 74 } | 71 } |
| 75 | 72 |
| 76 service->Initialize(local_file_service.Pass(), | 73 service->Initialize(local_file_service.Pass(), |
| 77 remote_file_service.Pass()); | 74 remote_file_service.Pass()); |
| 78 return service; | 75 return service; |
| 79 } | 76 } |
| 80 | 77 |
| 81 } // namespace sync_file_system | 78 } // namespace sync_file_system |
| OLD | NEW |