OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_system_provider/service.h" | 5 #include "chrome/browser/chromeos/file_system_provider/service.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 272 |
273 if (!event_router->ExtensionHasEventListener( | 273 if (!event_router->ExtensionHasEventListener( |
274 extension_id, extensions::api::file_system_provider:: | 274 extension_id, extensions::api::file_system_provider:: |
275 OnMountRequested::kEventName)) { | 275 OnMountRequested::kEventName)) { |
276 return false; | 276 return false; |
277 } | 277 } |
278 | 278 |
279 event_router->DispatchEventToExtension( | 279 event_router->DispatchEventToExtension( |
280 extension_id, | 280 extension_id, |
281 make_scoped_ptr(new extensions::Event( | 281 make_scoped_ptr(new extensions::Event( |
| 282 extensions::events::UNKNOWN, |
282 extensions::api::file_system_provider::OnMountRequested::kEventName, | 283 extensions::api::file_system_provider::OnMountRequested::kEventName, |
283 scoped_ptr<base::ListValue>(new base::ListValue())))); | 284 scoped_ptr<base::ListValue>(new base::ListValue())))); |
284 | 285 |
285 return true; | 286 return true; |
286 } | 287 } |
287 | 288 |
288 std::vector<ProvidedFileSystemInfo> Service::GetProvidedFileSystemInfoList() { | 289 std::vector<ProvidedFileSystemInfo> Service::GetProvidedFileSystemInfoList() { |
289 DCHECK(thread_checker_.CalledOnValidThread()); | 290 DCHECK(thread_checker_.CalledOnValidThread()); |
290 | 291 |
291 std::vector<ProvidedFileSystemInfo> result; | 292 std::vector<ProvidedFileSystemInfo> result; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 } | 453 } |
453 | 454 |
454 void Service::OnWatcherListChanged( | 455 void Service::OnWatcherListChanged( |
455 const ProvidedFileSystemInfo& file_system_info, | 456 const ProvidedFileSystemInfo& file_system_info, |
456 const Watchers& watchers) { | 457 const Watchers& watchers) { |
457 registry_->RememberFileSystem(file_system_info, watchers); | 458 registry_->RememberFileSystem(file_system_info, watchers); |
458 } | 459 } |
459 | 460 |
460 } // namespace file_system_provider | 461 } // namespace file_system_provider |
461 } // namespace chromeos | 462 } // namespace chromeos |
OLD | NEW |