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

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

Issue 291403004: [SyncFS] Add TaskLogger and wire up it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/remote_file_sync_service.h" 5 #include "chrome/browser/sync_file_system/remote_file_sync_service.h"
6 6
7 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h" 7 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h"
8 #include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_servi ce.h" 8 #include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_servi ce.h"
9 9
10 namespace sync_file_system { 10 namespace sync_file_system {
11 11
12 scoped_ptr<RemoteFileSyncService> 12 scoped_ptr<RemoteFileSyncService>
13 RemoteFileSyncService::CreateForBrowserContext( 13 RemoteFileSyncService::CreateForBrowserContext(
14 BackendVersion version, 14 BackendVersion version,
15 content::BrowserContext* context) { 15 content::BrowserContext* context,
16 TaskLogger* task_logger) {
16 switch (version) { 17 switch (version) {
17 case V1: 18 case V1:
18 return DriveFileSyncService::Create( 19 return DriveFileSyncService::Create(
19 Profile::FromBrowserContext(context)).PassAs<RemoteFileSyncService>(); 20 Profile::FromBrowserContext(context)).PassAs<RemoteFileSyncService>();
20 case V2: 21 case V2:
21 return drive_backend::SyncEngine::CreateForBrowserContext( 22 return drive_backend::SyncEngine::CreateForBrowserContext(
22 context).PassAs<RemoteFileSyncService>(); 23 context, task_logger).PassAs<RemoteFileSyncService>();
23 } 24 }
24 NOTREACHED() << "Unknown version " << version; 25 NOTREACHED() << "Unknown version " << version;
25 return scoped_ptr<RemoteFileSyncService>(); 26 return scoped_ptr<RemoteFileSyncService>();
26 } 27 }
27 28
28 void RemoteFileSyncService::AppendDependsOnFactories( 29 void RemoteFileSyncService::AppendDependsOnFactories(
29 BackendVersion version, 30 BackendVersion version,
30 std::set<BrowserContextKeyedServiceFactory*>* factories) { 31 std::set<BrowserContextKeyedServiceFactory*>* factories) {
31 switch (version) { 32 switch (version) {
32 case V1: 33 case V1:
33 DriveFileSyncService::AppendDependsOnFactories(factories); 34 DriveFileSyncService::AppendDependsOnFactories(factories);
34 return; 35 return;
35 case V2: 36 case V2:
36 drive_backend::SyncEngine::AppendDependsOnFactories(factories); 37 drive_backend::SyncEngine::AppendDependsOnFactories(factories);
37 return; 38 return;
38 } 39 }
39 NOTREACHED() << "Unknown version " << version; 40 NOTREACHED() << "Unknown version " << version;
40 } 41 }
41 42
42 } // namespace sync_file_system 43 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/remote_file_sync_service.h ('k') | chrome/browser/sync_file_system/sync_file_system_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698