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

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

Issue 16109008: Cleanup: Deprecate DriveFileSyncService::kServiceName (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/google_apis/drive_notification_manager_factory.h" 8 #include "chrome/browser/google_apis/drive_notification_manager_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sync/profile_sync_service.h" 10 #include "chrome/browser/sync/profile_sync_service.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 scoped_ptr<LocalFileSyncService> local_file_service( 55 scoped_ptr<LocalFileSyncService> local_file_service(
56 new LocalFileSyncService(profile)); 56 new LocalFileSyncService(profile));
57 57
58 scoped_ptr<RemoteFileSyncService> remote_file_service; 58 scoped_ptr<RemoteFileSyncService> remote_file_service;
59 if (mock_remote_file_service_) { 59 if (mock_remote_file_service_) {
60 remote_file_service = mock_remote_file_service_.Pass(); 60 remote_file_service = mock_remote_file_service_.Pass();
61 } else { 61 } else {
62 // FileSystem needs to be registered before DriveFileSyncService runs 62 // FileSystem needs to be registered before DriveFileSyncService runs
63 // its initialization code. 63 // its initialization code.
64 RegisterSyncableFileSystem(DriveFileSyncService::kServiceName); 64 RegisterSyncableFileSystem();
65 remote_file_service = 65 remote_file_service =
66 DriveFileSyncService::Create(profile).PassAs<RemoteFileSyncService>(); 66 DriveFileSyncService::Create(profile).PassAs<RemoteFileSyncService>();
67 } 67 }
68 68
69 if (CommandLine::ForCurrentProcess()->HasSwitch(kDisableLastWriteWin)) { 69 if (CommandLine::ForCurrentProcess()->HasSwitch(kDisableLastWriteWin)) {
70 remote_file_service->SetConflictResolutionPolicy( 70 remote_file_service->SetConflictResolutionPolicy(
71 CONFLICT_RESOLUTION_MANUAL); 71 CONFLICT_RESOLUTION_MANUAL);
72 } 72 }
73 73
74 service->Initialize(local_file_service.Pass(), 74 service->Initialize(local_file_service.Pass(),
75 remote_file_service.Pass()); 75 remote_file_service.Pass());
76 return service; 76 return service;
77 } 77 }
78 78
79 } // namespace sync_file_system 79 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698