OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/arc/arc_downloads_watcher_service.h" | 5 #include "chrome/browser/chromeos/arc/arc_downloads_watcher_service.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 if (watcher_) { | 281 if (watcher_) { |
282 BrowserThread::DeleteSoon(BrowserThread::FILE, FROM_HERE, | 282 BrowserThread::DeleteSoon(BrowserThread::FILE, FROM_HERE, |
283 watcher_.release()); | 283 watcher_.release()); |
284 } | 284 } |
285 } | 285 } |
286 | 286 |
287 void ArcDownloadsWatcherService::OnDownloadsChanged( | 287 void ArcDownloadsWatcherService::OnDownloadsChanged( |
288 mojo::Array<mojo::String> paths) { | 288 mojo::Array<mojo::String> paths) { |
289 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 289 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
290 | 290 |
291 auto* instance = arc_bridge_service()->file_system()->instance(); | 291 auto* instance = arc_bridge_service()->file_system()->GetInstanceForMethod( |
| 292 "RequestMediaScan"); |
292 if (!instance) | 293 if (!instance) |
293 return; | 294 return; |
294 instance->RequestMediaScan(std::move(paths)); | 295 instance->RequestMediaScan(std::move(paths)); |
295 } | 296 } |
296 | 297 |
297 } // namespace arc | 298 } // namespace arc |
OLD | NEW |