New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 742722 link

Starred by 3 users

Issue metadata

Status: Archived
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature

Blocking:
issue 739398


Participants' hotlists:
Hotlist-Recent


Sign in to add a comment

Recent file system

Project Member Reported by nya@chromium.org, Jul 14 2017

Issue description

Implement "Recent" file system in Files app.

Design doc: go/filesapp-recent

 

Comment 1 by nya@chromium.org, Jul 14 2017

Launch bug: Issue 739398

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c5bf4f816ed39f84ef32f0f24192908be0504dd

commit 2c5bf4f816ed39f84ef32f0f24192908be0504dd
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Jul 14 07:47:26 2017

recent: Add a string for new "Recent" root in Files app.

BUG= chromium:742722 
TEST=trybot

Change-Id: I9c232f829bd5e290edd2fbe2e1296e65153f1fae
Reviewed-on: https://chromium-review.googlesource.com/571107
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486702}
[modify] https://crrev.com/2c5bf4f816ed39f84ef32f0f24192908be0504dd/chrome/app/chromeos_strings.grdp

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb3ac0215bfc80f02ceb9575dafb79142110d7c7

commit eb3ac0215bfc80f02ceb9575dafb79142110d7c7
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Jul 28 06:08:21 2017

recent: Add a skeleton for the new Recent file system.

The new file system does nothing, and can't be accessed for now.

Bug:  742722 
Test: Files app works.
Change-Id: I8c99d2fe09ee5ff49ab51bbf61d928795aab6895
Reviewed-on: https://chromium-review.googlesource.com/588948
Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490294}
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chromeos/fileapi/file_system_backend.cc
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chromeos/fileapi/file_system_backend.h
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc
[add] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chromeos/fileapi/recent_async_file_util.cc
[add] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chromeos/fileapi/recent_async_file_util.h
[add] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chromeos/fileapi/recent_backend_delegate.cc
[add] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/chromeos/fileapi/recent_backend_delegate.h
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/chrome/browser/platform_util_unittest.cc
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/storage/browser/fileapi/file_system_context.cc
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/storage/common/fileapi/file_system_types.h
[modify] https://crrev.com/eb3ac0215bfc80f02ceb9575dafb79142110d7c7/storage/common/fileapi/file_system_util.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/975f86a4b46dc26540d66770e7bcf1dc58f5be5e

commit 975f86a4b46dc26540d66770e7bcf1dc58f5be5e
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Aug 04 08:54:58 2017

recent: Introduce RecentModel.

This change introduces core concepts of Recent file system:

RecentModel:

  The most important class owning RecentSources.

  The only API it provides is GetRecentFiles() which queries
  RecentSources for recently modified files and build a list of
  recently modified files across file systems, and also caches the
  result for better file system operation performance.

  Files are represented as FileSystemURL.

RecentSource:

  Interface class for a source of recent files.

  This interface will be implemented for several sources such as local
  storages and cloud storages so that they appear in Recent file
  system.

RecentContext:

  Holds several "context" objects necessary for operations in
  RecentModel and RecentSource.

Bug:  742722 
Test: unit_tests
Change-Id: I2a2ff1fa28e8cf5c705ad1ee6bc75a39b49b2f0b
Reviewed-on: https://chromium-review.googlesource.com/588950
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491968}
[modify] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/BUILD.gn
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_context.cc
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_context.h
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_model.cc
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_model.h
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_model_factory.cc
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_model_factory.h
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_source.cc
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/recent_source.h
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/test/fake_recent_source.cc
[add] https://crrev.com/975f86a4b46dc26540d66770e7bcf1dc58f5be5e/chrome/browser/chromeos/fileapi/test/fake_recent_source.h

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 4 2017

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/da9d3ddca15319f27d122820b787967fd88b0441

commit da9d3ddca15319f27d122820b787967fd88b0441
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 09 07:21:29 2017

Revert "recent: Add a skeleton for the new Recent file system."

This reverts commit eb3ac0215bfc80f02ceb9575dafb79142110d7c7.

Reason for revert: We've changed the design during code review and we no longer use this skeleton.

Original change's description:
> recent: Add a skeleton for the new Recent file system.
> 
> The new file system does nothing, and can't be accessed for now.
> 
> Bug:  742722 
> Test: Files app works.
> Change-Id: I8c99d2fe09ee5ff49ab51bbf61d928795aab6895
> Reviewed-on: https://chromium-review.googlesource.com/588948
> Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
> Commit-Queue: Shuhei Takahashi <nya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#490294}

TBR=thestig@chromium.org,mtomasz@chromium.org,nya@chromium.org,tzik@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  742722 
Change-Id: I033939aaa8fdaa89c8bf9f8aaea9dc09798fce11
Reviewed-on: https://chromium-review.googlesource.com/601568
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492883}
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/chrome/browser/chromeos/fileapi/file_system_backend.cc
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/chrome/browser/chromeos/fileapi/file_system_backend.h
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc
[delete] https://crrev.com/6cfd64bf20f963c45a1909193252b6caa9597902/chrome/browser/chromeos/fileapi/recent_async_file_util.cc
[delete] https://crrev.com/6cfd64bf20f963c45a1909193252b6caa9597902/chrome/browser/chromeos/fileapi/recent_async_file_util.h
[delete] https://crrev.com/6cfd64bf20f963c45a1909193252b6caa9597902/chrome/browser/chromeos/fileapi/recent_backend_delegate.cc
[delete] https://crrev.com/6cfd64bf20f963c45a1909193252b6caa9597902/chrome/browser/chromeos/fileapi/recent_backend_delegate.h
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/chrome/browser/platform_util_unittest.cc
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/storage/browser/fileapi/file_system_context.cc
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/storage/common/fileapi/file_system_types.h
[modify] https://crrev.com/da9d3ddca15319f27d122820b787967fd88b0441/storage/common/fileapi/file_system_util.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/329169379c3e90e53fff0cd8796af74673edbbef

commit 329169379c3e90e53fff0cd8796af74673edbbef
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 09 08:35:16 2017

recent: RecentModel belongs to the UI thread.

Since RecentModel is a KeyedService, it is owned by the UI thread.
Note that RecentModel is not yet used in any code for now, so it's
fine to make changes to DCHECK_CURRENT_ON().

Bug:  742722 
Test: unit_tests
Test: browser_tests in CL:601571
Change-Id: I92d70ef90e236b29190b3af7270d6c82738798d9
Reviewed-on: https://chromium-review.googlesource.com/606814
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492907}
[modify] https://crrev.com/329169379c3e90e53fff0cd8796af74673edbbef/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/329169379c3e90e53fff0cd8796af74673edbbef/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/329169379c3e90e53fff0cd8796af74673edbbef/chrome/browser/chromeos/fileapi/recent_source.h
[modify] https://crrev.com/329169379c3e90e53fff0cd8796af74673edbbef/chrome/browser/chromeos/fileapi/test/fake_recent_source.h

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e79c6f18310e180fb856d36a6eb808f948236989

commit e79c6f18310e180fb856d36a6eb808f948236989
Author: Shuhei Takahashi <nya@chromium.org>
Date: Thu Aug 10 01:43:44 2017

recent: Add a new Mojo method to retrieve recent documents.

Bug:  742722 
Test: unit_tests
Change-Id: Iaf3ca6439480c0a60fa060b6d78b660a40d6ae8c
Reviewed-on: https://chromium-review.googlesource.com/589091
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493216}
[modify] https://crrev.com/e79c6f18310e180fb856d36a6eb808f948236989/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.cc
[modify] https://crrev.com/e79c6f18310e180fb856d36a6eb808f948236989/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h
[modify] https://crrev.com/e79c6f18310e180fb856d36a6eb808f948236989/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_unittest.cc
[modify] https://crrev.com/e79c6f18310e180fb856d36a6eb808f948236989/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.cc
[modify] https://crrev.com/e79c6f18310e180fb856d36a6eb808f948236989/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.h
[modify] https://crrev.com/e79c6f18310e180fb856d36a6eb808f948236989/components/arc/common/file_system.mojom
[modify] https://crrev.com/e79c6f18310e180fb856d36a6eb808f948236989/components/arc/test/fake_file_system_instance.cc
[modify] https://crrev.com/e79c6f18310e180fb856d36a6eb808f948236989/components/arc/test/fake_file_system_instance.h

Blocking: 739398
Project Member

Comment 10 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/30458d6c388a5caefef1826a6c50a45ae000826c

commit 30458d6c388a5caefef1826a6c50a45ae000826c
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Aug 15 03:46:10 2017

recent: Add a private API to query recently modified files.

Bug:  742722 
Test: browser_tests in CL:601571
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I85e03723f31841cbf01589286f9c0d71912afcbe
Reviewed-on: https://chromium-review.googlesource.com/601727
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494319}
[modify] https://crrev.com/30458d6c388a5caefef1826a6c50a45ae000826c/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
[modify] https://crrev.com/30458d6c388a5caefef1826a6c50a45ae000826c/chrome/browser/chromeos/extensions/file_manager/private_api_misc.h
[modify] https://crrev.com/30458d6c388a5caefef1826a6c50a45ae000826c/chrome/common/extensions/api/file_manager_private.idl
[modify] https://crrev.com/30458d6c388a5caefef1826a6c50a45ae000826c/chrome/common/extensions/api/file_manager_private_internal.idl
[modify] https://crrev.com/30458d6c388a5caefef1826a6c50a45ae000826c/chrome/renderer/resources/extensions/file_manager_private_custom_bindings.js
[modify] https://crrev.com/30458d6c388a5caefef1826a6c50a45ae000826c/extensions/browser/extension_function_histogram_value.h
[modify] https://crrev.com/30458d6c388a5caefef1826a6c50a45ae000826c/third_party/closure_compiler/externs/file_manager_private.js
[modify] https://crrev.com/30458d6c388a5caefef1826a6c50a45ae000826c/tools/metrics/histograms/enums.xml

Comment 11 by ryoh@chromium.org, Aug 16 2017

Cc: ryoh@chromium.org
Project Member

Comment 12 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/882a4dbbdc275901c1b2a5726f1ffe46bd74f637

commit 882a4dbbdc275901c1b2a5726f1ffe46bd74f637
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 16 06:40:40 2017

recent: Implement a recent source for Downloads.

Bug:  742722 
Test: unit_tests
Test: browser_tests
Change-Id: Icb7bfa9f58fe799ecf366753d169e0f553879b83
Reviewed-on: https://chromium-review.googlesource.com/601571
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494707}
[modify] https://crrev.com/882a4dbbdc275901c1b2a5726f1ffe46bd74f637/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/882a4dbbdc275901c1b2a5726f1ffe46bd74f637/chrome/browser/chromeos/extensions/file_manager/file_manager_private_apitest.cc
[add] https://crrev.com/882a4dbbdc275901c1b2a5726f1ffe46bd74f637/chrome/browser/chromeos/fileapi/recent_download_source.cc
[add] https://crrev.com/882a4dbbdc275901c1b2a5726f1ffe46bd74f637/chrome/browser/chromeos/fileapi/recent_download_source.h
[add] https://crrev.com/882a4dbbdc275901c1b2a5726f1ffe46bd74f637/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/882a4dbbdc275901c1b2a5726f1ffe46bd74f637/chrome/browser/chromeos/fileapi/recent_model.cc
[add] https://crrev.com/882a4dbbdc275901c1b2a5726f1ffe46bd74f637/chrome/test/data/extensions/api_test/file_browser/recent_test/manifest.json
[add] https://crrev.com/882a4dbbdc275901c1b2a5726f1ffe46bd74f637/chrome/test/data/extensions/api_test/file_browser/recent_test/test.js

Project Member

Comment 13 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f0790b38fa924ada8d4b228bc293247ace1455ec

commit f0790b38fa924ada8d4b228bc293247ace1455ec
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 16 07:33:58 2017

recent: Convert ArcDocumentsProviderRootMap to a KeyedService.

This change makes ArcDocumentsProviderRootMap owned by Profile so that
it can be shared among several components. Previously, it was owned by
ArcDocumentsProviderBackendDelegate living on the IO thread.

This is a preparation for Recent view so that it can call into
ArcDocumentsProviderRoot methods directly, rather than indirectly via
file system API.

Bug:  742722 
Test: git cl lint
Test: unit_tests
Test: DCHECK does not trigger with dcheck_always_on=true binary
Change-Id: I3b8edf224e33ff2a638c0213de654e810f88fe1f
Reviewed-on: https://chromium-review.googlesource.com/609828
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494716}
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_file_stream_reader.cc
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_file_stream_reader.h
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.cc
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.h
[add] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map_factory.cc
[add] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map_factory.h
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_watcher_manager.cc
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_watcher_manager.h
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.cc
[modify] https://crrev.com/f0790b38fa924ada8d4b228bc293247ace1455ec/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.h

Project Member

Comment 14 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5459d1beccfeaa093569cbba6fe61da80da0fb81

commit 5459d1beccfeaa093569cbba6fe61da80da0fb81
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 16 08:47:54 2017

recent: Add a parameter to set the drive search order.

Recent needs to query Drive files in last modified order.

Bug:  742722 
Test: unit_tests
Change-Id: I51aa26fdf6da276d6fb46b953fb27cf903e813a5
Reviewed-on: https://chromium-review.googlesource.com/616491
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Daichi Hirono <hirono@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494728}
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/chromeos/dummy_file_system.h
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/chromeos/fake_file_system.cc
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/chromeos/fake_file_system.h
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/chromeos/file_system.cc
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/chromeos/file_system.h
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/chromeos/file_system_interface.h
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/chromeos/search_metadata.cc
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/chromeos/search_metadata.h
[modify] https://crrev.com/5459d1beccfeaa093569cbba6fe61da80da0fb81/components/drive/search_metadata_unittest.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c79df072ac7430e4f5f8b08862877ec6634a29a

commit 1c79df072ac7430e4f5f8b08862877ec6634a29a
Author: Shuhei Takahashi <nya@chromium.org>
Date: Thu Aug 17 08:07:30 2017

recent: Record time to load in UMA stats.

Bug:  742722 
Test: unit_tests
Test: chrome://histograms
Change-Id: Ic67e671854f43c3ba40c6d719892d302980a9275
Reviewed-on: https://chromium-review.googlesource.com/616504
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495104}
[modify] https://crrev.com/1c79df072ac7430e4f5f8b08862877ec6634a29a/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/1c79df072ac7430e4f5f8b08862877ec6634a29a/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/1c79df072ac7430e4f5f8b08862877ec6634a29a/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/1c79df072ac7430e4f5f8b08862877ec6634a29a/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/1c79df072ac7430e4f5f8b08862877ec6634a29a/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/1c79df072ac7430e4f5f8b08862877ec6634a29a/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
[modify] https://crrev.com/1c79df072ac7430e4f5f8b08862877ec6634a29a/tools/metrics/histograms/histograms.xml

Project Member

Comment 17 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c463ba93a399f1c2a04009fbc30c62dbf6cec41

commit 3c463ba93a399f1c2a04009fbc30c62dbf6cec41
Author: Shuhei Takahashi <nya@chromium.org>
Date: Thu Aug 17 13:54:18 2017

recent: Update API of ArcDocumentsProviderRoot::ReadDirectory().

Formerly it used the same signature as AsyncFileUtil::ReadDirectory().
With this patch, it uses a custom signature with two modification to
the original one:

- ThinFileInfo is returned instead of DirectoryEntry. It contains
  |document_id| field.
- |has_more| is not passed and the callback is called only once.

This new API is used by RecentArcMediaSource.

Also, timing to call RunLoop::Quit() is improved in unit tests.

Bug:  742722 
Test: unit_tests
Change-Id: I48ecd681a676318c57034959d361923bdae7875b
Reviewed-on: https://chromium-review.googlesource.com/618409
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495161}
[modify] https://crrev.com/3c463ba93a399f1c2a04009fbc30c62dbf6cec41/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
[modify] https://crrev.com/3c463ba93a399f1c2a04009fbc30c62dbf6cec41/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/3c463ba93a399f1c2a04009fbc30c62dbf6cec41/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/3c463ba93a399f1c2a04009fbc30c62dbf6cec41/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/68ade5482719ec2436f648b28e17ebb7c6472774

commit 68ade5482719ec2436f648b28e17ebb7c6472774
Author: Shuhei Takahashi <nya@chromium.org>
Date: Thu Aug 17 14:17:26 2017

recent: Update the condition of ArcDocumentsProviderRootMapFactory.

It now uses the same way as ArcBrowserContextKeyedServiceFactoryBase.

Bug:  742722 
Test: Media view works
Change-Id: I753df48c42c687edb357b13600a2e24b17396642
Reviewed-on: https://chromium-review.googlesource.com/618728
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495165}
[modify] https://crrev.com/68ade5482719ec2436f648b28e17ebb7c6472774/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.cc
[modify] https://crrev.com/68ade5482719ec2436f648b28e17ebb7c6472774/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map_factory.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Aug 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2436d23c10041c887d7b02a4883705be42bae896

commit 2436d23c10041c887d7b02a4883705be42bae896
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Aug 18 05:20:14 2017

recent: Implement a recent source for ARC media views.

RecentArcMediaSource gathers recent ARC media files in following steps:

1. Call ArcFileSystemOperationRunner::GetRecentDocuments() to get the
   list of IDs of recently modified documents.

2. Call ArcDocumentsProviderRoot::ReadDirectory() recursively to
   look for file paths of recently modified documents on Media View.

3. After the whole tree is scanned, build FileSystemURLs for paths
   found and return them.

Bug:  742722 
Test: unit_tests
Change-Id: I2a67c795c26106470ab2b5a3bd868bb8c41fb1b7
Reviewed-on: https://chromium-review.googlesource.com/588730
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495470}
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.cc
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.h
[add] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[add] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[add] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/fileapi/recent_model_factory.cc
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/chrome/browser/chromeos/fileapi/recent_source.h
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/components/arc/test/fake_file_system_instance.cc
[modify] https://crrev.com/2436d23c10041c887d7b02a4883705be42bae896/components/arc/test/fake_file_system_instance.h

Comment 20 by nya@chromium.org, Aug 18 2017

Cc: fukino@chromium.org
+fukino kindly offered help for UI.

Project Member

Comment 21 by bugdroid1@chromium.org, Aug 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f7c7e3e037807e5c2cd3433b521c460ab5b54aeb

commit f7c7e3e037807e5c2cd3433b521c460ab5b54aeb
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Aug 18 06:54:49 2017

recent: Cache directory entries in ArcDocumentsProviderRoot.

Currently, showing directory contents in Media Views on Files app takes
O(N^2) time where N is the number of files under the directory. It is
because Files app calls ReadDirectory() once and GetFileInfo() N times,
and each call takes O(N) time because they need to build a mapping
between file names and document IDs of all files under the directory.

This patch lets ArcDocumentsProviderRoot to cache a list of files
under a directory. This makes GetFileInfo() against a file under
a cached directory finish in O(1) time, allowing the sequence of
operations mentioned above to finish in O(N) time overall.

Cached directory entries are cleared after 60 seconds.

This is critical for Recent because Recent needs to scan whole Media
View tree to look up recently modified files.

Bug:  742722 
Test: unit_tests
Change-Id: I2a43cb158aa3c6385b804b1c1ca76914571e3ef2
Reviewed-on: https://chromium-review.googlesource.com/616409
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495489}
[modify] https://crrev.com/f7c7e3e037807e5c2cd3433b521c460ab5b54aeb/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/f7c7e3e037807e5c2cd3433b521c460ab5b54aeb/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/f7c7e3e037807e5c2cd3433b521c460ab5b54aeb/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
[modify] https://crrev.com/f7c7e3e037807e5c2cd3433b521c460ab5b54aeb/components/arc/test/fake_file_system_instance.cc
[modify] https://crrev.com/f7c7e3e037807e5c2cd3433b521c460ab5b54aeb/components/arc/test/fake_file_system_instance.h

Project Member

Comment 22 by bugdroid1@chromium.org, Aug 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b95b4cc40b23f088586ba32aaf3296c0306924a

commit 1b95b4cc40b23f088586ba32aaf3296c0306924a
Author: Shuhei Takahashi <nya@chromium.org>
Date: Mon Aug 21 03:02:45 2017

recent: Record time to load in UMA stats.

This patch adds UMA stats of time to load in RecentDriveSource and
RecentArcMediaSource. Note that we already have the same metric in
RecentDownloadSource.

Bug:  742722 
Test: unit_tests
Change-Id: I1397b98bff7e288cc41ffa6d074b645518a37b88
Reviewed-on: https://chromium-review.googlesource.com/620509
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495865}
[modify] https://crrev.com/1b95b4cc40b23f088586ba32aaf3296c0306924a/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[modify] https://crrev.com/1b95b4cc40b23f088586ba32aaf3296c0306924a/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[modify] https://crrev.com/1b95b4cc40b23f088586ba32aaf3296c0306924a/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[modify] https://crrev.com/1b95b4cc40b23f088586ba32aaf3296c0306924a/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[modify] https://crrev.com/1b95b4cc40b23f088586ba32aaf3296c0306924a/chrome/browser/chromeos/fileapi/recent_drive_source.h
[modify] https://crrev.com/1b95b4cc40b23f088586ba32aaf3296c0306924a/tools/metrics/histograms/histograms.xml

Project Member

Comment 23 by bugdroid1@chromium.org, Aug 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4acf27b1d49c2347e5cad550fd2eb9bbfadc5cc

commit d4acf27b1d49c2347e5cad550fd2eb9bbfadc5cc
Author: Shuhei Takahashi <nya@chromium.org>
Date: Mon Aug 21 08:16:58 2017

recent: Return last modified time from ReadDirectory().

This timestamp will be used to filter old files in RecentArcMediaSource
without bothering to call GetFileInfo() for every file returned.

Bug:  742722 
Test: unit_tests
Change-Id: I1934066626c7ce26c25df677991611ad73c279be
Reviewed-on: https://chromium-review.googlesource.com/622464
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495877}
[modify] https://crrev.com/d4acf27b1d49c2347e5cad550fd2eb9bbfadc5cc/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/d4acf27b1d49c2347e5cad550fd2eb9bbfadc5cc/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/d4acf27b1d49c2347e5cad550fd2eb9bbfadc5cc/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc

Comment 24 by nya@chromium.org, Aug 21 2017

Labels: Merge-Request-61
We're very close to land all required changes. Requesting merge in advance.

Project Member

Comment 25 by bugdroid1@chromium.org, Aug 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/257ee53412f5fd504eace2daf11ed49b6c1360d1

commit 257ee53412f5fd504eace2daf11ed49b6c1360d1
Author: Shuhei Takahashi <nya@chromium.org>
Date: Mon Aug 21 09:06:22 2017

recent: Improve logic to gather recent files.

Formerly, RecentModel simply merged recent file lists returned from
various sources without filtering them at all, and it was
RecentSource's responsibility to limit a recent file list to certain
size and exclude too old files.

However this naive approach is not intuitive to users; for example,
a file modified yesterday might not be shown if there are many other
files modified today on the same source, while a file modified last
month can be shown if it is on a different source.

With this patch, conceptually, Recent view will show the first 1000
items of the complete list of all covered files (possibly containing
millions of items) sorted by descending order of last modified time.

To compute this list, we query each source for 1000 recently modified
files, merge the lists, and take only the first 1000 items. This
requires RecentModel to know the last modified time of files returned
from sources, so RecentSource::GetRecentFiles() is modified to return
std::vector<RecentFile> (where RecentFile is essentially a pair of
FileSystemURL and last modified time), instead of
std::vector<FileSystemURL>.

Bug:  742722 
Test: unit_tests
Change-Id: I193e837a7eb28f9475c834e05489f6e6dd957f1d
Reviewed-on: https://chromium-review.googlesource.com/622334
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495888}
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_drive_source.h
[add] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_file.cc
[add] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_file.h
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/recent_source.h
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/test/fake_recent_source.cc
[modify] https://crrev.com/257ee53412f5fd504eace2daf11ed49b6c1360d1/chrome/browser/chromeos/fileapi/test/fake_recent_source.h

Labels: -Merge-Request-61 Merge-Approved-61
Approving merge to M61 Chrome OS.
Project Member

Comment 27 by bugdroid1@chromium.org, Aug 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eddd75759fbe96a0f8ab27b9fba446c2069602da

commit eddd75759fbe96a0f8ab27b9fba446c2069602da
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Aug 22 04:40:58 2017

recent: Improve filtering of recent files.

Two parameters are introduced to RecentContext:

  max_files: Maximum number of files a RecentSource is expected to
    return. It is fine to return more files than requested here, but
    excessive items will be filtered out by RecentModel.

  cutoff_time: Cut-off last modified time. RecentSource is expected to
    return files modified after this timestamp. It is fine to return
    older files than requested here, but they will be filtered out by
    RecentModel.

These parameters are used in RecentSource to optionally filter out
non-recent files. The same filtering is enforced in RecentModel.

Also, RecentModel::GetRecentFiles() is updated to take FileSystemContext
and origin directly, instead of RecentContext, since it is up to
RecentModel to decide those numbers for filtering.

Bug:  742722 
Test: unit_tests
Change-Id: I66d0e80ebd8feaf72f27db0c3f6761e581906525
Reviewed-on: https://chromium-review.googlesource.com/622511
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496214}
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_context.cc
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_context.h
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/eddd75759fbe96a0f8ab27b9fba446c2069602da/chrome/browser/chromeos/fileapi/recent_model_unittest.cc

Project Member

Comment 28 by bugdroid1@chromium.org, Aug 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d

commit f6d87477c4c7ffab6be1a9623f5842acd90a6e3d
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Aug 22 07:07:04 2017

recent: Rename RecentContext to RecentSource::Params.

RecentContext is used exclusively within RecentSource, so we make it a
child class of RecentSource to avoid possible abuses.

Also, GetRecentFilesCallback is put in Params too. As a side effect,
Params is no longer copyable.

Bug:  742722 
Test: unit_tests
Change-Id: I39bd193708bfd06920cbae9b5266d556e91655f3
Reviewed-on: https://chromium-review.googlesource.com/625536
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496238}
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[delete] https://crrev.com/65ff57c5d14fdbf35edc49c66ca317880fd6ab65/chrome/browser/chromeos/fileapi/recent_context.cc
[delete] https://crrev.com/65ff57c5d14fdbf35edc49c66ca317880fd6ab65/chrome/browser/chromeos/fileapi/recent_context.h
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_drive_source.h
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_source.cc
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/recent_source.h
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/test/fake_recent_source.cc
[modify] https://crrev.com/f6d87477c4c7ffab6be1a9623f5842acd90a6e3d/chrome/browser/chromeos/fileapi/test/fake_recent_source.h

Project Member

Comment 29 by bugdroid1@chromium.org, Aug 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/51e26097ae11e12fa6b115781024e45baf70f502

commit 51e26097ae11e12fa6b115781024e45baf70f502
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Aug 22 08:08:22 2017

recent: Process ReadDirectoryInternal() calls in batch.

This performance improvement is good to have, especially for the case
where the cache expires while a bunch of GetFileInfo() calls are made
in parallel.

Bug:  742722 
Test: unit_tests
Change-Id: I8fc1fe13008296a6d5d4d1667efee64296684806
Reviewed-on: https://chromium-review.googlesource.com/624768
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496247}
[modify] https://crrev.com/51e26097ae11e12fa6b115781024e45baf70f502/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/51e26097ae11e12fa6b115781024e45baf70f502/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/51e26097ae11e12fa6b115781024e45baf70f502/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
[modify] https://crrev.com/51e26097ae11e12fa6b115781024e45baf70f502/components/arc/test/fake_file_system_instance.h

Project Member

Comment 30 by bugdroid1@chromium.org, Aug 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/352b02d06f4b5317884ffea14df45594bcf89573

commit 352b02d06f4b5317884ffea14df45594bcf89573
Author: Shuhei Takahashi <nya@chromium.org>
Date: Tue Aug 22 08:53:43 2017

recent: Use cache for GetFileInfo().

Formerly, GetFileInfo() always called the mojo method GetDocument().
With this patch, GetFileInfo() will not call GetDocument(), but instead
it will call GetChildDocuments() against the parent document and use
the cached DirectoryCache if available.

This performance improvement is critical because GetFileInfo() can be
called everywhere even if it is not called explicitly from Files app.
Most importantly, it is called when storage::FileSystemURL in C++ is
converted to FileEntry in JavaScript (see
FileManagerPrivateCustomBindings::GetExternalFileEntry()), meaning that
each conversion needs to call a mojo IPC method.

With this change, time to return 100 files from RecentArcMediaSource
in fileSystemPrivate.getRecentFiles() is improved from ~1000ms to ~40ms
on samus.

Bug:  742722 
Test: unit_tests
Change-Id: I51a59990cfce2d1f4b3cf0d1703ab8a6f96868c2
Reviewed-on: https://chromium-review.googlesource.com/624825
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496256}
[modify] https://crrev.com/352b02d06f4b5317884ffea14df45594bcf89573/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/352b02d06f4b5317884ffea14df45594bcf89573/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h

Project Member

Comment 31 by bugdroid1@chromium.org, Aug 23 2017

Labels: -merge-approved-61 merge-merged-3163
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/69f1494967a081f5994f8c30d3888747777458eb

commit 69f1494967a081f5994f8c30d3888747777458eb
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 04:47:14 2017

recent: Add a skeleton for the new Recent file system.

The new file system does nothing, and can't be accessed for now.

TBR=nya@chromium.org

(cherry picked from commit eb3ac0215bfc80f02ceb9575dafb79142110d7c7)

Bug:  742722 
Test: Files app works.
Change-Id: I8c99d2fe09ee5ff49ab51bbf61d928795aab6895
Reviewed-on: https://chromium-review.googlesource.com/588948
Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#490294}
Reviewed-on: https://chromium-review.googlesource.com/627351
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#798}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chromeos/fileapi/file_system_backend.cc
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chromeos/fileapi/file_system_backend.h
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc
[add] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chromeos/fileapi/recent_async_file_util.cc
[add] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chromeos/fileapi/recent_async_file_util.h
[add] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chromeos/fileapi/recent_backend_delegate.cc
[add] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/chromeos/fileapi/recent_backend_delegate.h
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/chrome/browser/platform_util_unittest.cc
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/storage/browser/fileapi/file_system_context.cc
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/storage/common/fileapi/file_system_types.h
[modify] https://crrev.com/69f1494967a081f5994f8c30d3888747777458eb/storage/common/fileapi/file_system_util.cc

Project Member

Comment 32 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fef8920b057a00d6478e92ae55083131f3d13c3b

commit fef8920b057a00d6478e92ae55083131f3d13c3b
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 04:50:15 2017

recent: Introduce RecentModel.

This change introduces core concepts of Recent file system:

RecentModel:

  The most important class owning RecentSources.

  The only API it provides is GetRecentFiles() which queries
  RecentSources for recently modified files and build a list of
  recently modified files across file systems, and also caches the
  result for better file system operation performance.

  Files are represented as FileSystemURL.

RecentSource:

  Interface class for a source of recent files.

  This interface will be implemented for several sources such as local
  storages and cloud storages so that they appear in Recent file
  system.

RecentContext:

  Holds several "context" objects necessary for operations in
  RecentModel and RecentSource.

TBR=nya@chromium.org

(cherry picked from commit 975f86a4b46dc26540d66770e7bcf1dc58f5be5e)

Bug:  742722 
Test: unit_tests
Change-Id: I2a2ff1fa28e8cf5c705ad1ee6bc75a39b49b2f0b
Reviewed-on: https://chromium-review.googlesource.com/588950
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#491968}
Reviewed-on: https://chromium-review.googlesource.com/627352
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#799}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/BUILD.gn
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_context.cc
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_context.h
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_model.cc
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_model.h
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_model_factory.cc
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_model_factory.h
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_source.cc
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_source.h
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/test/fake_recent_source.cc
[add] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/test/fake_recent_source.h

Project Member

Comment 33 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/731d173d9b31e845659dd3cbf30b97dc5c5ae184

commit 731d173d9b31e845659dd3cbf30b97dc5c5ae184
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 04:53:56 2017

Revert "recent: Add a skeleton for the new Recent file system."

This reverts commit eb3ac0215bfc80f02ceb9575dafb79142110d7c7.

Reason for revert: We've changed the design during code review and we no longer use this skeleton.

Original change's description:
> recent: Add a skeleton for the new Recent file system.
>
> The new file system does nothing, and can't be accessed for now.
>
> Bug:  742722 
> Test: Files app works.
> Change-Id: I8c99d2fe09ee5ff49ab51bbf61d928795aab6895
> Reviewed-on: https://chromium-review.googlesource.com/588948
> Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
> Commit-Queue: Shuhei Takahashi <nya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#490294}

TBR=mtomasz@chromium.org, nya@chromium.org, thestig@chromium.org, tzik@chromium.org


(cherry picked from commit da9d3ddca15319f27d122820b787967fd88b0441)

Bug:  742722 
Change-Id: I033939aaa8fdaa89c8bf9f8aaea9dc09798fce11
Reviewed-on: https://chromium-review.googlesource.com/601568
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#492883}
Reviewed-on: https://chromium-review.googlesource.com/627545
Cr-Commit-Position: refs/branch-heads/3163@{#800}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/chrome/browser/chromeos/fileapi/file_system_backend.cc
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/chrome/browser/chromeos/fileapi/file_system_backend.h
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc
[delete] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_async_file_util.cc
[delete] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_async_file_util.h
[delete] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_backend_delegate.cc
[delete] https://crrev.com/fef8920b057a00d6478e92ae55083131f3d13c3b/chrome/browser/chromeos/fileapi/recent_backend_delegate.h
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/chrome/browser/platform_util_unittest.cc
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/storage/browser/fileapi/file_system_context.cc
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/storage/common/fileapi/file_system_types.h
[modify] https://crrev.com/731d173d9b31e845659dd3cbf30b97dc5c5ae184/storage/common/fileapi/file_system_util.cc

Project Member

Comment 34 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f6d4d85af36b26390c7c68f6bb0b934528dea33

commit 6f6d4d85af36b26390c7c68f6bb0b934528dea33
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 04:56:27 2017

arc: Move GetFileNameForDocument to public utilities.

This function will be used in Recent. As a bonus, unit tests are added.

TBR=nya@chromium.org

(cherry picked from commit 22a0e78cfe0f42a1a35f820c5bfc529576ff46a1)

Bug:  742722 
Test: unit_tests
Change-Id: I0c5d6271e7845fb0d7f86047414f652e049348f3
Reviewed-on: https://chromium-review.googlesource.com/588811
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#491972}
Reviewed-on: https://chromium-review.googlesource.com/627532
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#801}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/6f6d4d85af36b26390c7c68f6bb0b934528dea33/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/6f6d4d85af36b26390c7c68f6bb0b934528dea33/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.cc
[modify] https://crrev.com/6f6d4d85af36b26390c7c68f6bb0b934528dea33/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h
[modify] https://crrev.com/6f6d4d85af36b26390c7c68f6bb0b934528dea33/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util_unittest.cc

Project Member

Comment 35 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e862e0dda87b0298f8ef170747fccc71bdab222d

commit e862e0dda87b0298f8ef170747fccc71bdab222d
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 04:57:45 2017

recent: RecentModel belongs to the UI thread.

Since RecentModel is a KeyedService, it is owned by the UI thread.
Note that RecentModel is not yet used in any code for now, so it's
fine to make changes to DCHECK_CURRENT_ON().

TBR=nya@chromium.org

(cherry picked from commit 329169379c3e90e53fff0cd8796af74673edbbef)

Bug:  742722 
Test: unit_tests
Test: browser_tests in CL:601571
Change-Id: I92d70ef90e236b29190b3af7270d6c82738798d9
Reviewed-on: https://chromium-review.googlesource.com/606814
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#492907}
Reviewed-on: https://chromium-review.googlesource.com/627533
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#802}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/e862e0dda87b0298f8ef170747fccc71bdab222d/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/e862e0dda87b0298f8ef170747fccc71bdab222d/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/e862e0dda87b0298f8ef170747fccc71bdab222d/chrome/browser/chromeos/fileapi/recent_source.h
[modify] https://crrev.com/e862e0dda87b0298f8ef170747fccc71bdab222d/chrome/browser/chromeos/fileapi/test/fake_recent_source.h

Project Member

Comment 36 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0cd15c8080520168c9f62f97fb6bc1d9a504ead5

commit 0cd15c8080520168c9f62f97fb6bc1d9a504ead5
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:00:16 2017

recent: Add a new Mojo method to retrieve recent documents.

TBR=nya@chromium.org

(cherry picked from commit e79c6f18310e180fb856d36a6eb808f948236989)

Bug:  742722 
Test: unit_tests
Change-Id: Iaf3ca6439480c0a60fa060b6d78b660a40d6ae8c
Reviewed-on: https://chromium-review.googlesource.com/589091
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#493216}
Reviewed-on: https://chromium-review.googlesource.com/627251
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#803}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/0cd15c8080520168c9f62f97fb6bc1d9a504ead5/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.cc
[modify] https://crrev.com/0cd15c8080520168c9f62f97fb6bc1d9a504ead5/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h
[modify] https://crrev.com/0cd15c8080520168c9f62f97fb6bc1d9a504ead5/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_unittest.cc
[modify] https://crrev.com/0cd15c8080520168c9f62f97fb6bc1d9a504ead5/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.cc
[modify] https://crrev.com/0cd15c8080520168c9f62f97fb6bc1d9a504ead5/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.h
[modify] https://crrev.com/0cd15c8080520168c9f62f97fb6bc1d9a504ead5/components/arc/common/file_system.mojom
[modify] https://crrev.com/0cd15c8080520168c9f62f97fb6bc1d9a504ead5/components/arc/test/fake_file_system_instance.cc
[modify] https://crrev.com/0cd15c8080520168c9f62f97fb6bc1d9a504ead5/components/arc/test/fake_file_system_instance.h

Project Member

Comment 37 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa0e982e72112834845f282fa395a3893ba04690

commit aa0e982e72112834845f282fa395a3893ba04690
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:07:04 2017

recent: Add a private API to query recently modified files.

TBR=nya@chromium.org

(cherry picked from commit 30458d6c388a5caefef1826a6c50a45ae000826c)

Bug:  742722 
Test: browser_tests in CL:601571
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I85e03723f31841cbf01589286f9c0d71912afcbe
Reviewed-on: https://chromium-review.googlesource.com/601727
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#494319}
Reviewed-on: https://chromium-review.googlesource.com/627546
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#804}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/aa0e982e72112834845f282fa395a3893ba04690/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
[modify] https://crrev.com/aa0e982e72112834845f282fa395a3893ba04690/chrome/browser/chromeos/extensions/file_manager/private_api_misc.h
[modify] https://crrev.com/aa0e982e72112834845f282fa395a3893ba04690/chrome/common/extensions/api/file_manager_private.idl
[modify] https://crrev.com/aa0e982e72112834845f282fa395a3893ba04690/chrome/common/extensions/api/file_manager_private_internal.idl
[modify] https://crrev.com/aa0e982e72112834845f282fa395a3893ba04690/chrome/renderer/resources/extensions/file_manager_private_custom_bindings.js
[modify] https://crrev.com/aa0e982e72112834845f282fa395a3893ba04690/extensions/browser/extension_function_histogram_value.h
[modify] https://crrev.com/aa0e982e72112834845f282fa395a3893ba04690/third_party/closure_compiler/externs/file_manager_private.js
[modify] https://crrev.com/aa0e982e72112834845f282fa395a3893ba04690/tools/metrics/histograms/enums.xml

Project Member

Comment 38 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dd41267922e27bc13ae93b18cb0e759101822abf

commit dd41267922e27bc13ae93b18cb0e759101822abf
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:09:11 2017

recent: Implement a recent source for Downloads.

TBR=nya@chromium.org

(cherry picked from commit 882a4dbbdc275901c1b2a5726f1ffe46bd74f637)

Bug:  742722 
Test: unit_tests
Test: browser_tests
Change-Id: Icb7bfa9f58fe799ecf366753d169e0f553879b83
Reviewed-on: https://chromium-review.googlesource.com/601571
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#494707}
Reviewed-on: https://chromium-review.googlesource.com/627252
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#805}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/dd41267922e27bc13ae93b18cb0e759101822abf/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/dd41267922e27bc13ae93b18cb0e759101822abf/chrome/browser/chromeos/extensions/file_manager/file_manager_private_apitest.cc
[add] https://crrev.com/dd41267922e27bc13ae93b18cb0e759101822abf/chrome/browser/chromeos/fileapi/recent_download_source.cc
[add] https://crrev.com/dd41267922e27bc13ae93b18cb0e759101822abf/chrome/browser/chromeos/fileapi/recent_download_source.h
[add] https://crrev.com/dd41267922e27bc13ae93b18cb0e759101822abf/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/dd41267922e27bc13ae93b18cb0e759101822abf/chrome/browser/chromeos/fileapi/recent_model.cc
[add] https://crrev.com/dd41267922e27bc13ae93b18cb0e759101822abf/chrome/test/data/extensions/api_test/file_browser/recent_test/manifest.json
[add] https://crrev.com/dd41267922e27bc13ae93b18cb0e759101822abf/chrome/test/data/extensions/api_test/file_browser/recent_test/test.js

Project Member

Comment 39 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/454eb7fc2505ee79014f25c6c2437dcdaf55717d

commit 454eb7fc2505ee79014f25c6c2437dcdaf55717d
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:10:16 2017

recent: Convert ArcDocumentsProviderRootMap to a KeyedService.

This change makes ArcDocumentsProviderRootMap owned by Profile so that
it can be shared among several components. Previously, it was owned by
ArcDocumentsProviderBackendDelegate living on the IO thread.

This is a preparation for Recent view so that it can call into
ArcDocumentsProviderRoot methods directly, rather than indirectly via
file system API.

TBR=nya@chromium.org

(cherry picked from commit f0790b38fa924ada8d4b228bc293247ace1455ec)

Bug:  742722 
Test: git cl lint
Test: unit_tests
Test: DCHECK does not trigger with dcheck_always_on=true binary
Change-Id: I3b8edf224e33ff2a638c0213de654e810f88fe1f
Reviewed-on: https://chromium-review.googlesource.com/609828
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#494716}
Reviewed-on: https://chromium-review.googlesource.com/627547
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#806}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_file_stream_reader.cc
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_file_stream_reader.h
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.cc
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.h
[add] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map_factory.cc
[add] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map_factory.h
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_watcher_manager.cc
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_watcher_manager.h
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.cc
[modify] https://crrev.com/454eb7fc2505ee79014f25c6c2437dcdaf55717d/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.h

Project Member

Comment 40 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fcd0a71c0f48aa4866798f23512cb26374a8290e

commit fcd0a71c0f48aa4866798f23512cb26374a8290e
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:11:17 2017

recent: Add a parameter to set the drive search order.

Recent needs to query Drive files in last modified order.

TBR=nya@chromium.org

(cherry picked from commit 5459d1beccfeaa093569cbba6fe61da80da0fb81)

Bug:  742722 
Test: unit_tests
Change-Id: I51aa26fdf6da276d6fb46b953fb27cf903e813a5
Reviewed-on: https://chromium-review.googlesource.com/616491
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Daichi Hirono <hirono@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#494728}
Reviewed-on: https://chromium-review.googlesource.com/627534
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#807}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/chromeos/dummy_file_system.h
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/chromeos/fake_file_system.cc
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/chromeos/fake_file_system.h
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/chromeos/file_system.cc
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/chromeos/file_system.h
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/chromeos/file_system_interface.h
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/chromeos/search_metadata.cc
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/chromeos/search_metadata.h
[modify] https://crrev.com/fcd0a71c0f48aa4866798f23512cb26374a8290e/components/drive/search_metadata_unittest.cc

Project Member

Comment 41 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cc443b9681a6d59f55fc9f5afb7494cc8339b82c

commit cc443b9681a6d59f55fc9f5afb7494cc8339b82c
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:12:19 2017

recent: Implement a recent source for Drive.

TBR=nya@chromium.org

(cherry picked from commit b1f9a9cbd9e2799ce1aabd5efbb2306bb6d2438f)

Bug:  742722 
Test: Drive files are returned by chrome.fileManagerPrivate.getRecentFile()
Change-Id: I9c413defa02d8d4a7cfdf58460b7482bec007f38
Reviewed-on: https://chromium-review.googlesource.com/616329
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Daichi Hirono <hirono@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495100}
Reviewed-on: https://chromium-review.googlesource.com/627535
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#808}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/cc443b9681a6d59f55fc9f5afb7494cc8339b82c/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/cc443b9681a6d59f55fc9f5afb7494cc8339b82c/chrome/browser/chromeos/fileapi/recent_context.cc
[modify] https://crrev.com/cc443b9681a6d59f55fc9f5afb7494cc8339b82c/chrome/browser/chromeos/fileapi/recent_context.h
[add] https://crrev.com/cc443b9681a6d59f55fc9f5afb7494cc8339b82c/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[add] https://crrev.com/cc443b9681a6d59f55fc9f5afb7494cc8339b82c/chrome/browser/chromeos/fileapi/recent_drive_source.h
[modify] https://crrev.com/cc443b9681a6d59f55fc9f5afb7494cc8339b82c/chrome/browser/chromeos/fileapi/recent_model.cc

Project Member

Comment 42 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b84df9dee68cc152b7731df7bd27a0cd124305f4

commit b84df9dee68cc152b7731df7bd27a0cd124305f4
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:13:44 2017

recent: Record time to load in UMA stats.

TBR=nya@chromium.org

(cherry picked from commit 1c79df072ac7430e4f5f8b08862877ec6634a29a)

Bug:  742722 
Test: unit_tests
Test: chrome://histograms
Change-Id: Ic67e671854f43c3ba40c6d719892d302980a9275
Reviewed-on: https://chromium-review.googlesource.com/616504
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495104}
Reviewed-on: https://chromium-review.googlesource.com/627936
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#809}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/b84df9dee68cc152b7731df7bd27a0cd124305f4/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/b84df9dee68cc152b7731df7bd27a0cd124305f4/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/b84df9dee68cc152b7731df7bd27a0cd124305f4/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/b84df9dee68cc152b7731df7bd27a0cd124305f4/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/b84df9dee68cc152b7731df7bd27a0cd124305f4/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/b84df9dee68cc152b7731df7bd27a0cd124305f4/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
[modify] https://crrev.com/b84df9dee68cc152b7731df7bd27a0cd124305f4/tools/metrics/histograms/histograms.xml

Project Member

Comment 43 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d72468bea35af2d1bba801166f26e02018da14a

commit 4d72468bea35af2d1bba801166f26e02018da14a
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:14:46 2017

recent: Update API of ArcDocumentsProviderRoot::ReadDirectory().

Formerly it used the same signature as AsyncFileUtil::ReadDirectory().
With this patch, it uses a custom signature with two modification to
the original one:

- ThinFileInfo is returned instead of DirectoryEntry. It contains
  |document_id| field.
- |has_more| is not passed and the callback is called only once.

This new API is used by RecentArcMediaSource.

Also, timing to call RunLoop::Quit() is improved in unit tests.

TBR=nya@chromium.org

(cherry picked from commit 3c463ba93a399f1c2a04009fbc30c62dbf6cec41)

Bug:  742722 
Test: unit_tests
Change-Id: I48ecd681a676318c57034959d361923bdae7875b
Reviewed-on: https://chromium-review.googlesource.com/618409
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495161}
Reviewed-on: https://chromium-review.googlesource.com/627354
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#810}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/4d72468bea35af2d1bba801166f26e02018da14a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
[modify] https://crrev.com/4d72468bea35af2d1bba801166f26e02018da14a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/4d72468bea35af2d1bba801166f26e02018da14a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/4d72468bea35af2d1bba801166f26e02018da14a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc

Project Member

Comment 44 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e250865aaa40248ba0c9e71fb4c4c27e7f15bd2e

commit e250865aaa40248ba0c9e71fb4c4c27e7f15bd2e
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:15:49 2017

recent: Update the condition of ArcDocumentsProviderRootMapFactory.

It now uses the same way as ArcBrowserContextKeyedServiceFactoryBase.

TBR=nya@chromium.org

(cherry picked from commit 68ade5482719ec2436f648b28e17ebb7c6472774)

Bug:  742722 
Test: Media view works
Change-Id: I753df48c42c687edb357b13600a2e24b17396642
Reviewed-on: https://chromium-review.googlesource.com/618728
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495165}
Reviewed-on: https://chromium-review.googlesource.com/627355
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#811}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/e250865aaa40248ba0c9e71fb4c4c27e7f15bd2e/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.cc
[modify] https://crrev.com/e250865aaa40248ba0c9e71fb4c4c27e7f15bd2e/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map_factory.cc

Project Member

Comment 45 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4

commit bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:16:50 2017

recent: Implement a recent source for ARC media views.

RecentArcMediaSource gathers recent ARC media files in following steps:

1. Call ArcFileSystemOperationRunner::GetRecentDocuments() to get the
   list of IDs of recently modified documents.

2. Call ArcDocumentsProviderRoot::ReadDirectory() recursively to
   look for file paths of recently modified documents on Media View.

3. After the whole tree is scanned, build FileSystemURLs for paths
   found and return them.

TBR=nya@chromium.org

(cherry picked from commit 2436d23c10041c887d7b02a4883705be42bae896)

Bug:  742722 
Test: unit_tests
Change-Id: I2a67c795c26106470ab2b5a3bd868bb8c41fb1b7
Reviewed-on: https://chromium-review.googlesource.com/588730
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495470}
Reviewed-on: https://chromium-review.googlesource.com/627548
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#812}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.cc
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_map.h
[add] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[add] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[add] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/fileapi/recent_model_factory.cc
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/chrome/browser/chromeos/fileapi/recent_source.h
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/components/arc/test/fake_file_system_instance.cc
[modify] https://crrev.com/bc1a35c76fc2680c443bad1f5a4d8a155b3ce8c4/components/arc/test/fake_file_system_instance.h

Project Member

Comment 46 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/582b2775ac2b62051005004909c9526f7a2e9acb

commit 582b2775ac2b62051005004909c9526f7a2e9acb
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:18:02 2017

recent: Cache directory entries in ArcDocumentsProviderRoot.

Currently, showing directory contents in Media Views on Files app takes
O(N^2) time where N is the number of files under the directory. It is
because Files app calls ReadDirectory() once and GetFileInfo() N times,
and each call takes O(N) time because they need to build a mapping
between file names and document IDs of all files under the directory.

This patch lets ArcDocumentsProviderRoot to cache a list of files
under a directory. This makes GetFileInfo() against a file under
a cached directory finish in O(1) time, allowing the sequence of
operations mentioned above to finish in O(N) time overall.

Cached directory entries are cleared after 60 seconds.

This is critical for Recent because Recent needs to scan whole Media
View tree to look up recently modified files.

TBR=nya@chromium.org

(cherry picked from commit f7c7e3e037807e5c2cd3433b521c460ab5b54aeb)

Bug:  742722 
Test: unit_tests
Change-Id: I2a43cb158aa3c6385b804b1c1ca76914571e3ef2
Reviewed-on: https://chromium-review.googlesource.com/616409
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495489}
Reviewed-on: https://chromium-review.googlesource.com/627937
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#813}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/582b2775ac2b62051005004909c9526f7a2e9acb/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/582b2775ac2b62051005004909c9526f7a2e9acb/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/582b2775ac2b62051005004909c9526f7a2e9acb/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
[modify] https://crrev.com/582b2775ac2b62051005004909c9526f7a2e9acb/components/arc/test/fake_file_system_instance.cc
[modify] https://crrev.com/582b2775ac2b62051005004909c9526f7a2e9acb/components/arc/test/fake_file_system_instance.h

Project Member

Comment 47 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b287016b5c453b5b62f5c5de44830ffbd49873cd

commit b287016b5c453b5b62f5c5de44830ffbd49873cd
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:19:13 2017

recent: Record time to load in UMA stats.

This patch adds UMA stats of time to load in RecentDriveSource and
RecentArcMediaSource. Note that we already have the same metric in
RecentDownloadSource.

TBR=nya@chromium.org

(cherry picked from commit 1b95b4cc40b23f088586ba32aaf3296c0306924a)

Bug:  742722 
Test: unit_tests
Change-Id: I1397b98bff7e288cc41ffa6d074b645518a37b88
Reviewed-on: https://chromium-review.googlesource.com/620509
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495865}
Reviewed-on: https://chromium-review.googlesource.com/627253
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#814}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/b287016b5c453b5b62f5c5de44830ffbd49873cd/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[modify] https://crrev.com/b287016b5c453b5b62f5c5de44830ffbd49873cd/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[modify] https://crrev.com/b287016b5c453b5b62f5c5de44830ffbd49873cd/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[modify] https://crrev.com/b287016b5c453b5b62f5c5de44830ffbd49873cd/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[modify] https://crrev.com/b287016b5c453b5b62f5c5de44830ffbd49873cd/chrome/browser/chromeos/fileapi/recent_drive_source.h
[modify] https://crrev.com/b287016b5c453b5b62f5c5de44830ffbd49873cd/tools/metrics/histograms/histograms.xml

Project Member

Comment 48 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48670fa3733ca9e90c8639ab411079e8e526dafe

commit 48670fa3733ca9e90c8639ab411079e8e526dafe
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:20:17 2017

recent: Return last modified time from ReadDirectory().

This timestamp will be used to filter old files in RecentArcMediaSource
without bothering to call GetFileInfo() for every file returned.

TBR=nya@chromium.org

(cherry picked from commit d4acf27b1d49c2347e5cad550fd2eb9bbfadc5cc)

Bug:  742722 
Test: unit_tests
Change-Id: I1934066626c7ce26c25df677991611ad73c279be
Reviewed-on: https://chromium-review.googlesource.com/622464
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495877}
Reviewed-on: https://chromium-review.googlesource.com/627956
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#815}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/48670fa3733ca9e90c8639ab411079e8e526dafe/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/48670fa3733ca9e90c8639ab411079e8e526dafe/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/48670fa3733ca9e90c8639ab411079e8e526dafe/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc

Project Member

Comment 49 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa74b26990ab1cdb075162419521c6e880fd8632

commit aa74b26990ab1cdb075162419521c6e880fd8632
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:21:19 2017

recent: Improve logic to gather recent files.

Formerly, RecentModel simply merged recent file lists returned from
various sources without filtering them at all, and it was
RecentSource's responsibility to limit a recent file list to certain
size and exclude too old files.

However this naive approach is not intuitive to users; for example,
a file modified yesterday might not be shown if there are many other
files modified today on the same source, while a file modified last
month can be shown if it is on a different source.

With this patch, conceptually, Recent view will show the first 1000
items of the complete list of all covered files (possibly containing
millions of items) sorted by descending order of last modified time.

To compute this list, we query each source for 1000 recently modified
files, merge the lists, and take only the first 1000 items. This
requires RecentModel to know the last modified time of files returned
from sources, so RecentSource::GetRecentFiles() is modified to return
std::vector<RecentFile> (where RecentFile is essentially a pair of
FileSystemURL and last modified time), instead of
std::vector<FileSystemURL>.

TBR=nya@chromium.org

(cherry picked from commit 257ee53412f5fd504eace2daf11ed49b6c1360d1)

Bug:  742722 
Test: unit_tests
Change-Id: I193e837a7eb28f9475c834e05489f6e6dd957f1d
Reviewed-on: https://chromium-review.googlesource.com/622334
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#495888}
Reviewed-on: https://chromium-review.googlesource.com/627957
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#816}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_drive_source.h
[add] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_file.cc
[add] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_file.h
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/recent_source.h
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/test/fake_recent_source.cc
[modify] https://crrev.com/aa74b26990ab1cdb075162419521c6e880fd8632/chrome/browser/chromeos/fileapi/test/fake_recent_source.h

Project Member

Comment 50 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a

commit 5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:22:41 2017

recent: Improve filtering of recent files.

Two parameters are introduced to RecentContext:

  max_files: Maximum number of files a RecentSource is expected to
    return. It is fine to return more files than requested here, but
    excessive items will be filtered out by RecentModel.

  cutoff_time: Cut-off last modified time. RecentSource is expected to
    return files modified after this timestamp. It is fine to return
    older files than requested here, but they will be filtered out by
    RecentModel.

These parameters are used in RecentSource to optionally filter out
non-recent files. The same filtering is enforced in RecentModel.

Also, RecentModel::GetRecentFiles() is updated to take FileSystemContext
and origin directly, instead of RecentContext, since it is up to
RecentModel to decide those numbers for filtering.

TBR=nya@chromium.org

(cherry picked from commit eddd75759fbe96a0f8ab27b9fba446c2069602da)

Bug:  742722 
Test: unit_tests
Change-Id: I66d0e80ebd8feaf72f27db0c3f6761e581906525
Reviewed-on: https://chromium-review.googlesource.com/622511
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#496214}
Reviewed-on: https://chromium-review.googlesource.com/627254
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#817}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_context.cc
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_context.h
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_model_unittest.cc

Project Member

Comment 51 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/456bdec09ef1180214782f79e1f65a132ae9597d

commit 456bdec09ef1180214782f79e1f65a132ae9597d
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:23:42 2017

recent: Rename RecentContext to RecentSource::Params.

RecentContext is used exclusively within RecentSource, so we make it a
child class of RecentSource to avoid possible abuses.

Also, GetRecentFilesCallback is put in Params too. As a side effect,
Params is no longer copyable.

TBR=nya@chromium.org

(cherry picked from commit f6d87477c4c7ffab6be1a9623f5842acd90a6e3d)

Bug:  742722 
Test: unit_tests
Change-Id: I39bd193708bfd06920cbae9b5266d556e91655f3
Reviewed-on: https://chromium-review.googlesource.com/625536
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#496238}
Reviewed-on: https://chromium-review.googlesource.com/627549
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#818}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
[delete] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_context.cc
[delete] https://crrev.com/5b64d9fce44d8ebbec46b3bfbbf7b7952228bd4a/chrome/browser/chromeos/fileapi/recent_context.h
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_download_source_unittest.cc
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_drive_source.cc
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_drive_source.h
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_model.cc
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_model.h
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_source.cc
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/recent_source.h
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/test/fake_recent_source.cc
[modify] https://crrev.com/456bdec09ef1180214782f79e1f65a132ae9597d/chrome/browser/chromeos/fileapi/test/fake_recent_source.h

Project Member

Comment 52 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4916afe63d96a673cb2e885fc11a9799d9f2cd4c

commit 4916afe63d96a673cb2e885fc11a9799d9f2cd4c
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:24:44 2017

recent: Process ReadDirectoryInternal() calls in batch.

This performance improvement is good to have, especially for the case
where the cache expires while a bunch of GetFileInfo() calls are made
in parallel.

TBR=nya@chromium.org

(cherry picked from commit 51e26097ae11e12fa6b115781024e45baf70f502)

Bug:  742722 
Test: unit_tests
Change-Id: I8fc1fe13008296a6d5d4d1667efee64296684806
Reviewed-on: https://chromium-review.googlesource.com/624768
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#496247}
Reviewed-on: https://chromium-review.googlesource.com/627550
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#819}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/4916afe63d96a673cb2e885fc11a9799d9f2cd4c/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/4916afe63d96a673cb2e885fc11a9799d9f2cd4c/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
[modify] https://crrev.com/4916afe63d96a673cb2e885fc11a9799d9f2cd4c/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
[modify] https://crrev.com/4916afe63d96a673cb2e885fc11a9799d9f2cd4c/components/arc/test/fake_file_system_instance.h

Project Member

Comment 53 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47f9d63d0f7a6477ff39286989ec609472cb8935

commit 47f9d63d0f7a6477ff39286989ec609472cb8935
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 05:25:45 2017

recent: Use cache for GetFileInfo().

Formerly, GetFileInfo() always called the mojo method GetDocument().
With this patch, GetFileInfo() will not call GetDocument(), but instead
it will call GetChildDocuments() against the parent document and use
the cached DirectoryCache if available.

This performance improvement is critical because GetFileInfo() can be
called everywhere even if it is not called explicitly from Files app.
Most importantly, it is called when storage::FileSystemURL in C++ is
converted to FileEntry in JavaScript (see
FileManagerPrivateCustomBindings::GetExternalFileEntry()), meaning that
each conversion needs to call a mojo IPC method.

With this change, time to return 100 files from RecentArcMediaSource
in fileSystemPrivate.getRecentFiles() is improved from ~1000ms to ~40ms
on samus.

TBR=nya@chromium.org

(cherry picked from commit 352b02d06f4b5317884ffea14df45594bcf89573)

Bug:  742722 
Test: unit_tests
Change-Id: I51a59990cfce2d1f4b3cf0d1703ab8a6f96868c2
Reviewed-on: https://chromium-review.googlesource.com/624825
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#496256}
Reviewed-on: https://chromium-review.googlesource.com/627255
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#820}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/47f9d63d0f7a6477ff39286989ec609472cb8935/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
[modify] https://crrev.com/47f9d63d0f7a6477ff39286989ec609472cb8935/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h

Project Member

Comment 54 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c37678e60c680f60984be603d0c4b813bf75b57

commit 0c37678e60c680f60984be603d0c4b813bf75b57
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 10:00:10 2017

recent: Add a parameter to restrict sources for getRecentFiles().

      'native_source', 'native_or_drive_source' and 'any_source'

Bug:  742722 
Test: browser_tests
Test: Manually called chrome.fileManagerPrivate.getRecentFiles() with
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ie105bb3a3c6bcfbdd69174c165f3f68bf448e31c
Reviewed-on: https://chromium-review.googlesource.com/625640
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496644}
[modify] https://crrev.com/0c37678e60c680f60984be603d0c4b813bf75b57/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
[modify] https://crrev.com/0c37678e60c680f60984be603d0c4b813bf75b57/chrome/browser/chromeos/extensions/file_manager/private_api_misc.h
[modify] https://crrev.com/0c37678e60c680f60984be603d0c4b813bf75b57/chrome/common/extensions/api/file_manager_private.idl
[modify] https://crrev.com/0c37678e60c680f60984be603d0c4b813bf75b57/chrome/common/extensions/api/file_manager_private_internal.idl
[modify] https://crrev.com/0c37678e60c680f60984be603d0c4b813bf75b57/chrome/renderer/resources/extensions/file_manager_private_custom_bindings.js
[modify] https://crrev.com/0c37678e60c680f60984be603d0c4b813bf75b57/chrome/test/data/extensions/api_test/file_browser/recent_test/test.js
[modify] https://crrev.com/0c37678e60c680f60984be603d0c4b813bf75b57/third_party/closure_compiler/externs/file_manager_private.js

Project Member

Comment 55 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c9557028e3a5bee93a41cad3b7ead92c1f3cc22

commit 3c9557028e3a5bee93a41cad3b7ead92c1f3cc22
Author: Shuhei Takahashi <nya@chromium.org>
Date: Wed Aug 23 10:35:55 2017

recent: Add a parameter to restrict sources for getRecentFiles().

      'native_source', 'native_or_drive_source' and 'any_source'

TBR=nya@chromium.org

(cherry picked from commit 0c37678e60c680f60984be603d0c4b813bf75b57)

Bug:  742722 
Test: browser_tests
Test: Manually called chrome.fileManagerPrivate.getRecentFiles() with
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ie105bb3a3c6bcfbdd69174c165f3f68bf448e31c
Reviewed-on: https://chromium-review.googlesource.com/625640
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#496644}
Reviewed-on: https://chromium-review.googlesource.com/628236
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#830}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/3c9557028e3a5bee93a41cad3b7ead92c1f3cc22/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
[modify] https://crrev.com/3c9557028e3a5bee93a41cad3b7ead92c1f3cc22/chrome/browser/chromeos/extensions/file_manager/private_api_misc.h
[modify] https://crrev.com/3c9557028e3a5bee93a41cad3b7ead92c1f3cc22/chrome/common/extensions/api/file_manager_private.idl
[modify] https://crrev.com/3c9557028e3a5bee93a41cad3b7ead92c1f3cc22/chrome/common/extensions/api/file_manager_private_internal.idl
[modify] https://crrev.com/3c9557028e3a5bee93a41cad3b7ead92c1f3cc22/chrome/renderer/resources/extensions/file_manager_private_custom_bindings.js
[modify] https://crrev.com/3c9557028e3a5bee93a41cad3b7ead92c1f3cc22/chrome/test/data/extensions/api_test/file_browser/recent_test/test.js
[modify] https://crrev.com/3c9557028e3a5bee93a41cad3b7ead92c1f3cc22/third_party/closure_compiler/externs/file_manager_private.js

Project Member

Comment 56 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c717b9044448a191924759f716ca76216db6fef2

commit c717b9044448a191924759f716ca76216db6fef2
Author: Naoki Fukino <fukino@chromium.org>
Date: Wed Aug 23 11:32:49 2017

Add Recent folder on the Files app UI.

The new API (chrome.fileManagerPrivate.getRecentFiles) returns recently-modified
files among Downloads, Google Drive, and Media view.
This CL adds a new root "Recent" on the directory tree in Files app to access the
recent files.
For the root of Recent folder, a new fake entry is introduced. The new fake entry
does not associated with any volumes, as it contains files from mixed volumes.
As a result, we allow EntryLocation not to have volumeInfo.

Bug:  742722 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I112dcd5d0c6291d18621716ac601c777ebe01689
Reviewed-on: https://chromium-review.googlesource.com/625511
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Reviewed-by: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496654}
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/background/js/entry_location_impl.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/background/js/volume_info_impl.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/background/js/volume_manager_impl.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/common/js/util.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/common/js/volume_manager_common.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/css/file_types.css
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/actions_model.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/dialog_action_controller.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/directory_contents.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/directory_model.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/file_manager.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/gear_menu_controller.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/navigation_list_model.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/ui/banners.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/ui/directory_tree_unittest.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/file_manager/foreground/js/volume_manager_wrapper.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/integration_tests/file_manager/drive_specific.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/integration_tests/file_manager/folder_shortcuts.js
[modify] https://crrev.com/c717b9044448a191924759f716ca76216db6fef2/ui/file_manager/integration_tests/file_manager/transfer.js

Project Member

Comment 57 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8

commit bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8
Author: Naoki Fukino <fukino@chromium.org>
Date: Wed Aug 23 11:40:14 2017

Add Recent folder on the Files app UI.

The new API (chrome.fileManagerPrivate.getRecentFiles) returns recently-modified
files among Downloads, Google Drive, and Media view.
This CL adds a new root "Recent" on the directory tree in Files app to access the
recent files.
For the root of Recent folder, a new fake entry is introduced. The new fake entry
does not associated with any volumes, as it contains files from mixed volumes.
As a result, we allow EntryLocation not to have volumeInfo.

TBR=fukino@chromium.org

(cherry picked from commit c717b9044448a191924759f716ca76216db6fef2)

Bug:  742722 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I112dcd5d0c6291d18621716ac601c777ebe01689
Reviewed-on: https://chromium-review.googlesource.com/625511
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Reviewed-by: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#496654}
Reviewed-on: https://chromium-review.googlesource.com/628397
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#831}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/background/js/entry_location_impl.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/background/js/volume_info_impl.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/background/js/volume_manager_impl.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/common/js/util.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/common/js/volume_manager_common.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/css/file_types.css
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/actions_model.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/dialog_action_controller.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/directory_contents.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/directory_model.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/file_manager.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/gear_menu_controller.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/navigation_list_model.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/ui/banners.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/ui/directory_tree_unittest.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/file_manager/foreground/js/volume_manager_wrapper.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/integration_tests/file_manager/drive_specific.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/integration_tests/file_manager/folder_shortcuts.js
[modify] https://crrev.com/bff90fffbdd8f81251418cfb5a6ce9eb57dc29d8/ui/file_manager/integration_tests/file_manager/transfer.js

Project Member

Comment 58 by bugdroid1@chromium.org, Aug 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3fa0db0945a681bc4edeb99e80faeed13e6bfb5e

commit 3fa0db0945a681bc4edeb99e80faeed13e6bfb5e
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Aug 25 05:25:56 2017

recent: Skip RecentArcMediaSource if ARC is booting.

Currently, while ARC is booting (e.g. the user has just logged into the
session, or is in the process of ARC opt-in), RecentArcMediaSource does
not respond until the boot is finished, due to deferring logic in
ArcFileSystemOperationRunner.

This causes two problems:

  1. Users need to wait until ARC boot finishes in order to open Recent.
  2. UMA metrics will get harder to understand because of deferring.

This patch tries to workaround the issue by naively skipping
RecentArcMediaSource if ARC is booting.

Bug:  742722 
Test: unit_tests
Test: Recent shows up instantly even if ARC is booting.
Change-Id: I1f0a81ff594486b7eae7035fd9abe7b180cb0c7f
Reviewed-on: https://chromium-review.googlesource.com/628050
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497329}
[modify] https://crrev.com/3fa0db0945a681bc4edeb99e80faeed13e6bfb5e/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h
[modify] https://crrev.com/3fa0db0945a681bc4edeb99e80faeed13e6bfb5e/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[modify] https://crrev.com/3fa0db0945a681bc4edeb99e80faeed13e6bfb5e/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[modify] https://crrev.com/3fa0db0945a681bc4edeb99e80faeed13e6bfb5e/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc

Project Member

Comment 59 by bugdroid1@chromium.org, Aug 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b5a7e83c474002035e74ccc8d179556793d6e11

commit 5b5a7e83c474002035e74ccc8d179556793d6e11
Author: Shuhei Takahashi <nya@chromium.org>
Date: Fri Aug 25 06:03:16 2017

recent: Skip RecentArcMediaSource if ARC is booting.

Currently, while ARC is booting (e.g. the user has just logged into the
session, or is in the process of ARC opt-in), RecentArcMediaSource does
not respond until the boot is finished, due to deferring logic in
ArcFileSystemOperationRunner.

This causes two problems:

  1. Users need to wait until ARC boot finishes in order to open Recent.
  2. UMA metrics will get harder to understand because of deferring.

This patch tries to workaround the issue by naively skipping
RecentArcMediaSource if ARC is booting.

TBR=nya@chromium.org

(cherry picked from commit 3fa0db0945a681bc4edeb99e80faeed13e6bfb5e)

Bug:  742722 
Test: unit_tests
Test: Recent shows up instantly even if ARC is booting.
Change-Id: I1f0a81ff594486b7eae7035fd9abe7b180cb0c7f
Reviewed-on: https://chromium-review.googlesource.com/628050
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#497329}
Reviewed-on: https://chromium-review.googlesource.com/634772
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#872}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/5b5a7e83c474002035e74ccc8d179556793d6e11/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h
[modify] https://crrev.com/5b5a7e83c474002035e74ccc8d179556793d6e11/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
[modify] https://crrev.com/5b5a7e83c474002035e74ccc8d179556793d6e11/chrome/browser/chromeos/fileapi/recent_arc_media_source.h
[modify] https://crrev.com/5b5a7e83c474002035e74ccc8d179556793d6e11/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc

Comment 60 by nya@chromium.org, Aug 25 2017

Status: Fixed (was: Started)
The main CLs are all landed and cherry-picked to M61 branch. I'm closing this bug now.

We have several follow-up tasks, but let's file separate bugs and decide whether to cherry-pick individually.

Comment 61 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment