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

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

Issue 23514025: Use GetForBrowserContext instead of GetForProfile for DriveNotificationManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & resolve conflict 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 | 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 scoped_ptr<drive::DriveAPIService> drive_api_service( 83 scoped_ptr<drive::DriveAPIService> drive_api_service(
84 new drive::DriveAPIService( 84 new drive::DriveAPIService(
85 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), 85 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
86 context->GetRequestContext(), 86 context->GetRequestContext(),
87 content::BrowserThread::GetBlockingPool(), 87 content::BrowserThread::GetBlockingPool(),
88 base_drive_url, base_download_url, wapi_base_url, 88 base_drive_url, base_download_url, wapi_base_url,
89 std::string() /* custom_user_agent */)); 89 std::string() /* custom_user_agent */));
90 90
91 drive::DriveNotificationManager* notification_manager = 91 drive::DriveNotificationManager* notification_manager =
92 drive::DriveNotificationManagerFactory::GetForProfile(profile); 92 drive::DriveNotificationManagerFactory::GetForBrowserContext(profile);
93 ExtensionService* extension_service = 93 ExtensionService* extension_service =
94 extensions::ExtensionSystem::Get(profile)->extension_service(); 94 extensions::ExtensionSystem::Get(profile)->extension_service();
95 95
96 scoped_ptr<drive_backend::SyncEngine> sync_engine( 96 scoped_ptr<drive_backend::SyncEngine> sync_engine(
97 new drive_backend::SyncEngine( 97 new drive_backend::SyncEngine(
98 context->GetPath(), 98 context->GetPath(),
99 drive_api_service.Pass(), 99 drive_api_service.Pass(),
100 notification_manager, 100 notification_manager,
101 extension_service)); 101 extension_service));
102 102
(...skipping 10 matching lines...) Expand all
113 remote_file_service->SetConflictResolutionPolicy( 113 remote_file_service->SetConflictResolutionPolicy(
114 CONFLICT_RESOLUTION_POLICY_MANUAL); 114 CONFLICT_RESOLUTION_POLICY_MANUAL);
115 } 115 }
116 116
117 service->Initialize(local_file_service.Pass(), 117 service->Initialize(local_file_service.Pass(),
118 remote_file_service.Pass()); 118 remote_file_service.Pass());
119 return service; 119 return service;
120 } 120 }
121 121
122 } // namespace sync_file_system 122 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698