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

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

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing CR for patch 12 and one more Android issue 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
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 "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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 kEnableSyncFileSystemV2)) { 73 kEnableSyncFileSystemV2)) {
74 RegisterSyncableFileSystem(); 74 RegisterSyncableFileSystem();
75 75
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 ProfileOAuth2TokenService* token_service =
84 ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
85
83 scoped_ptr<drive::DriveAPIService> drive_api_service( 86 scoped_ptr<drive::DriveAPIService> drive_api_service(
84 new drive::DriveAPIService( 87 new drive::DriveAPIService(
85 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), 88 token_service,
89 token_service->GetPrimaryAccountId(),
86 context->GetRequestContext(), 90 context->GetRequestContext(),
87 content::BrowserThread::GetBlockingPool(), 91 content::BrowserThread::GetBlockingPool(),
88 base_drive_url, base_download_url, wapi_base_url, 92 base_drive_url, base_download_url, wapi_base_url,
89 std::string() /* custom_user_agent */)); 93 std::string() /* custom_user_agent */));
90 94
91 drive::DriveNotificationManager* notification_manager = 95 drive::DriveNotificationManager* notification_manager =
92 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile); 96 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile);
93 ExtensionService* extension_service = 97 ExtensionService* extension_service =
94 extensions::ExtensionSystem::Get(profile)->extension_service(); 98 extensions::ExtensionSystem::Get(profile)->extension_service();
95 99
(...skipping 18 matching lines...) Expand all
114 remote_file_service->SetConflictResolutionPolicy( 118 remote_file_service->SetConflictResolutionPolicy(
115 CONFLICT_RESOLUTION_POLICY_MANUAL); 119 CONFLICT_RESOLUTION_POLICY_MANUAL);
116 } 120 }
117 121
118 service->Initialize(local_file_service.Pass(), 122 service->Initialize(local_file_service.Pass(),
119 remote_file_service.Pass()); 123 remote_file_service.Pass());
120 return service; 124 return service;
121 } 125 }
122 126
123 } // namespace sync_file_system 127 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698