OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/api/file_system/file_system_api.h" | 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "apps/saved_files_service.h" | 10 #include "apps/saved_files_service.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 ConsentProviderDelegate consent_provider_delegate(profile, nullptr); | 323 ConsentProviderDelegate consent_provider_delegate(profile, nullptr); |
324 ConsentProvider consent_provider(&consent_provider_delegate); | 324 ConsentProvider consent_provider(&consent_provider_delegate); |
325 extensions::api::file_system::VolumeListChangedEvent event_args; | 325 extensions::api::file_system::VolumeListChangedEvent event_args; |
326 FillVolumeList(profile, &event_args.volumes); | 326 FillVolumeList(profile, &event_args.volumes); |
327 for (const auto& extension : registry->enabled_extensions()) { | 327 for (const auto& extension : registry->enabled_extensions()) { |
328 if (!consent_provider.IsGrantable(*extension.get())) | 328 if (!consent_provider.IsGrantable(*extension.get())) |
329 continue; | 329 continue; |
330 event_router->DispatchEventToExtension( | 330 event_router->DispatchEventToExtension( |
331 extension->id(), | 331 extension->id(), |
332 make_scoped_ptr(new Event( | 332 make_scoped_ptr(new Event( |
| 333 events::UNKNOWN, |
333 extensions::api::file_system::OnVolumeListChanged::kEventName, | 334 extensions::api::file_system::OnVolumeListChanged::kEventName, |
334 extensions::api::file_system::OnVolumeListChanged::Create( | 335 extensions::api::file_system::OnVolumeListChanged::Create( |
335 event_args)))); | 336 event_args)))); |
336 } | 337 } |
337 } | 338 } |
338 | 339 |
339 ConsentProvider::ConsentProvider(DelegateInterface* delegate) | 340 ConsentProvider::ConsentProvider(DelegateInterface* delegate) |
340 : delegate_(delegate) { | 341 : delegate_(delegate) { |
341 DCHECK(delegate_); | 342 DCHECK(delegate_); |
342 } | 343 } |
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 std::vector<linked_ptr<Volume>> result_volume_list; | 1449 std::vector<linked_ptr<Volume>> result_volume_list; |
1449 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); | 1450 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); |
1450 | 1451 |
1451 return RespondNow( | 1452 return RespondNow( |
1452 ArgumentList(extensions::api::file_system::GetVolumeList::Results::Create( | 1453 ArgumentList(extensions::api::file_system::GetVolumeList::Results::Create( |
1453 result_volume_list).Pass())); | 1454 result_volume_list).Pass())); |
1454 } | 1455 } |
1455 #endif | 1456 #endif |
1456 | 1457 |
1457 } // namespace extensions | 1458 } // namespace extensions |
OLD | NEW |