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

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

Issue 63923002: net: Use SequencedTaskRunner for URLFetcherResponseWriter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add include Created 7 years, 1 month 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 "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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 scoped_refptr<base::SequencedWorkerPool> worker_pool( 81 scoped_refptr<base::SequencedWorkerPool> worker_pool(
82 content::BrowserThread::GetBlockingPool()); 82 content::BrowserThread::GetBlockingPool());
83 83
84 ProfileOAuth2TokenService* token_service = 84 ProfileOAuth2TokenService* token_service =
85 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); 85 ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
86 scoped_ptr<drive::DriveAPIService> drive_service( 86 scoped_ptr<drive::DriveAPIService> drive_service(
87 new drive::DriveAPIService( 87 new drive::DriveAPIService(
88 token_service, 88 token_service,
89 context->GetRequestContext(), 89 context->GetRequestContext(),
90 worker_pool.get(), 90 worker_pool->GetSequencedTaskRunner(
91 worker_pool->GetSequenceToken()).get(),
91 base_drive_url, base_download_url, wapi_base_url, 92 base_drive_url, base_download_url, wapi_base_url,
92 std::string() /* custom_user_agent */)); 93 std::string() /* custom_user_agent */));
93 drive_service->Initialize(token_service->GetPrimaryAccountId()); 94 drive_service->Initialize(token_service->GetPrimaryAccountId());
94 95
95 drive::DriveNotificationManager* notification_manager = 96 drive::DriveNotificationManager* notification_manager =
96 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile); 97 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile);
97 ExtensionService* extension_service = 98 ExtensionService* extension_service =
98 extensions::ExtensionSystem::Get(profile)->extension_service(); 99 extensions::ExtensionSystem::Get(profile)->extension_service();
99 100
100 scoped_refptr<base::SequencedTaskRunner> task_runner( 101 scoped_refptr<base::SequencedTaskRunner> task_runner(
(...skipping 20 matching lines...) Expand all
121 remote_file_service->SetConflictResolutionPolicy( 122 remote_file_service->SetConflictResolutionPolicy(
122 CONFLICT_RESOLUTION_POLICY_MANUAL); 123 CONFLICT_RESOLUTION_POLICY_MANUAL);
123 } 124 }
124 125
125 service->Initialize(local_file_service.Pass(), 126 service->Initialize(local_file_service.Pass(),
126 remote_file_service.Pass()); 127 remote_file_service.Pass());
127 return service; 128 return service;
128 } 129 }
129 130
130 } // namespace sync_file_system 131 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698