OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/chromeos/file_manager/volume_manager_factory.h" | 5 #include "chrome/browser/chromeos/file_manager/volume_manager_factory.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 10 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
11 #include "chrome/browser/chromeos/file_manager/volume_manager.h" | 11 #include "chrome/browser/chromeos/file_manager/volume_manager.h" |
| 12 #include "chrome/browser/chromeos/file_system_provider/file_system_plugin/plugin
_service_factory.h" |
12 #include "chrome/browser/chromeos/file_system_provider/service_factory.h" | 13 #include "chrome/browser/chromeos/file_system_provider/service_factory.h" |
13 #include "chrome/browser/profiles/incognito_helpers.h" | 14 #include "chrome/browser/profiles/incognito_helpers.h" |
14 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
15 #include "chromeos/dbus/dbus_thread_manager.h" | 16 #include "chromeos/dbus/dbus_thread_manager.h" |
16 #include "chromeos/disks/disk_mount_manager.h" | 17 #include "chromeos/disks/disk_mount_manager.h" |
17 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 18 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
18 #include "components/storage_monitor/storage_monitor.h" | 19 #include "components/storage_monitor/storage_monitor.h" |
19 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" | 20 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" |
20 | 21 |
21 namespace file_manager { | 22 namespace file_manager { |
(...skipping 22 matching lines...) Expand all Loading... |
44 } | 45 } |
45 | 46 |
46 KeyedService* VolumeManagerFactory::BuildServiceInstanceFor( | 47 KeyedService* VolumeManagerFactory::BuildServiceInstanceFor( |
47 content::BrowserContext* context) const { | 48 content::BrowserContext* context) const { |
48 Profile* const profile = Profile::FromBrowserContext(context); | 49 Profile* const profile = Profile::FromBrowserContext(context); |
49 VolumeManager* instance = new VolumeManager( | 50 VolumeManager* instance = new VolumeManager( |
50 profile, drive::DriveIntegrationServiceFactory::GetForProfile(profile), | 51 profile, drive::DriveIntegrationServiceFactory::GetForProfile(profile), |
51 chromeos::DBusThreadManager::Get()->GetPowerManagerClient(), | 52 chromeos::DBusThreadManager::Get()->GetPowerManagerClient(), |
52 chromeos::disks::DiskMountManager::GetInstance(), | 53 chromeos::disks::DiskMountManager::GetInstance(), |
53 chromeos::file_system_provider::ServiceFactory::Get(context), | 54 chromeos::file_system_provider::ServiceFactory::Get(context), |
| 55 chromeos::file_system_provider::PluginServiceFactory::Get(context), |
54 VolumeManager::GetMtpStorageInfoCallback()); | 56 VolumeManager::GetMtpStorageInfoCallback()); |
55 instance->Initialize(); | 57 instance->Initialize(); |
56 return instance; | 58 return instance; |
57 } | 59 } |
58 | 60 |
59 VolumeManagerFactory::VolumeManagerFactory() | 61 VolumeManagerFactory::VolumeManagerFactory() |
60 : BrowserContextKeyedServiceFactory( | 62 : BrowserContextKeyedServiceFactory( |
61 "VolumeManagerFactory", | 63 "VolumeManagerFactory", |
62 BrowserContextDependencyManager::GetInstance()) { | 64 BrowserContextDependencyManager::GetInstance()) { |
63 DependsOn(drive::DriveIntegrationServiceFactory::GetInstance()); | 65 DependsOn(drive::DriveIntegrationServiceFactory::GetInstance()); |
64 DependsOn(chromeos::file_system_provider::ServiceFactory::GetInstance()); | 66 DependsOn(chromeos::file_system_provider::ServiceFactory::GetInstance()); |
| 67 DependsOn( |
| 68 chromeos::file_system_provider::PluginServiceFactory::GetInstance()); |
65 } | 69 } |
66 | 70 |
67 VolumeManagerFactory::~VolumeManagerFactory() { | 71 VolumeManagerFactory::~VolumeManagerFactory() { |
68 } | 72 } |
69 | 73 |
70 } // namespace file_manager | 74 } // namespace file_manager |
OLD | NEW |