| 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 "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
| 9 #include "chrome/browser/drive/drive_api_service.h" | 9 #include "chrome/browser/drive/drive_api_service.h" |
| 10 #include "chrome/browser/drive/drive_notification_manager_factory.h" | 10 #include "chrome/browser/drive/drive_notification_manager_factory.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 GURL base_drive_url( | 76 GURL base_drive_url( |
| 77 google_apis::DriveApiUrlGenerator::kBaseUrlForProduction); | 77 google_apis::DriveApiUrlGenerator::kBaseUrlForProduction); |
| 78 GURL base_download_url( | 78 GURL base_download_url( |
| 79 google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction); | 79 google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction); |
| 80 GURL wapi_base_url( | 80 GURL wapi_base_url( |
| 81 google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction); | 81 google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction); |
| 82 | 82 |
| 83 scoped_refptr<base::SequencedWorkerPool> worker_pool( | 83 scoped_refptr<base::SequencedWorkerPool> worker_pool( |
| 84 content::BrowserThread::GetBlockingPool()); | 84 content::BrowserThread::GetBlockingPool()); |
| 85 | 85 |
| 86 ProfileOAuth2TokenService* token_service = |
| 87 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); |
| 86 scoped_ptr<drive::DriveAPIService> drive_api_service( | 88 scoped_ptr<drive::DriveAPIService> drive_api_service( |
| 87 new drive::DriveAPIService( | 89 new drive::DriveAPIService( |
| 88 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 90 token_service, |
| 91 token_service->GetPrimaryAccountId(), |
| 89 context->GetRequestContext(), | 92 context->GetRequestContext(), |
| 90 worker_pool.get(), | 93 worker_pool.get(), |
| 91 base_drive_url, base_download_url, wapi_base_url, | 94 base_drive_url, base_download_url, wapi_base_url, |
| 92 std::string() /* custom_user_agent */)); | 95 std::string() /* custom_user_agent */)); |
| 93 | 96 |
| 94 drive::DriveNotificationManager* notification_manager = | 97 drive::DriveNotificationManager* notification_manager = |
| 95 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile); | 98 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile); |
| 96 ExtensionService* extension_service = | 99 ExtensionService* extension_service = |
| 97 extensions::ExtensionSystem::Get(profile)->extension_service(); | 100 extensions::ExtensionSystem::Get(profile)->extension_service(); |
| 98 | 101 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 123 remote_file_service->SetConflictResolutionPolicy( | 126 remote_file_service->SetConflictResolutionPolicy( |
| 124 CONFLICT_RESOLUTION_POLICY_MANUAL); | 127 CONFLICT_RESOLUTION_POLICY_MANUAL); |
| 125 } | 128 } |
| 126 | 129 |
| 127 service->Initialize(local_file_service.Pass(), | 130 service->Initialize(local_file_service.Pass(), |
| 128 remote_file_service.Pass()); | 131 remote_file_service.Pass()); |
| 129 return service; | 132 return service; |
| 130 } | 133 } |
| 131 | 134 |
| 132 } // namespace sync_file_system | 135 } // namespace sync_file_system |
| OLD | NEW |