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/media_galleries/media_folder_finder.h" | 5 #include "chrome/browser/media_galleries/media_folder_finder.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/file_util.h" | |
11 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| 11 #include "base/files/file_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/sequence_checker.h" | 13 #include "base/sequence_checker.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/task_runner_util.h" | 16 #include "base/task_runner_util.h" |
17 #include "base/threading/sequenced_worker_pool.h" | 17 #include "base/threading/sequenced_worker_pool.h" |
18 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 18 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
19 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" | 19 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" |
20 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
21 #include "components/storage_monitor/storage_monitor.h" | 21 #include "components/storage_monitor/storage_monitor.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 if (!IsEmptyScanResult(reply.scan_result)) | 436 if (!IsEmptyScanResult(reply.scan_result)) |
437 results_[path] = reply.scan_result; | 437 results_[path] = reply.scan_result; |
438 | 438 |
439 // Push new folders to the |folders_to_scan_| in reverse order. | 439 // Push new folders to the |folders_to_scan_| in reverse order. |
440 std::copy(reply.new_folders.rbegin(), reply.new_folders.rend(), | 440 std::copy(reply.new_folders.rbegin(), reply.new_folders.rend(), |
441 std::back_inserter(folders_to_scan_)); | 441 std::back_inserter(folders_to_scan_)); |
442 | 442 |
443 ScanFolder(); | 443 ScanFolder(); |
444 } | 444 } |
OLD | NEW |