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

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

Issue 23856002: SyncFS: Support resolveLocalFileSystemURL on SyncFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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) 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698