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

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: Rebasing to include the update to ProfileSyncService: r224220 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
89 context->GetRequestContext(), 91 context->GetRequestContext(),
90 worker_pool.get(), 92 worker_pool.get(),
91 base_drive_url, base_download_url, wapi_base_url, 93 base_drive_url, base_download_url, wapi_base_url,
92 std::string() /* custom_user_agent */)); 94 std::string() /* custom_user_agent */));
93 95
94 drive::DriveNotificationManager* notification_manager = 96 drive::DriveNotificationManager* notification_manager =
95 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile); 97 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile);
96 ExtensionService* extension_service = 98 ExtensionService* extension_service =
97 extensions::ExtensionSystem::Get(profile)->extension_service(); 99 extensions::ExtensionSystem::Get(profile)->extension_service();
98 100
(...skipping 24 matching lines...) Expand all
123 remote_file_service->SetConflictResolutionPolicy( 125 remote_file_service->SetConflictResolutionPolicy(
124 CONFLICT_RESOLUTION_POLICY_MANUAL); 126 CONFLICT_RESOLUTION_POLICY_MANUAL);
125 } 127 }
126 128
127 service->Initialize(local_file_service.Pass(), 129 service->Initialize(local_file_service.Pass(),
128 remote_file_service.Pass()); 130 remote_file_service.Pass());
129 return service; 131 return service;
130 } 132 }
131 133
132 } // namespace sync_file_system 134 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698