Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Issue 2951003002: SavedFilesService interface in //extensions (Closed)

Created:
3 years, 6 months ago by michaelpg
Modified:
3 years, 6 months ago
Reviewers:
benwells
CC:
chromium-reviews, extensions-reviews_chromium.org, tzik, tfarina, nhiroki, chromium-apps-reviews_chromium.org, kinuko+fileapi, rkc, Devlin
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

SavedFilesService interface in //extensions CLOSED: see https://codereview.chromium.org/2960433002/ apps::SavedFilesService provides apps with a LRU queue of "retained" file entries they are allowed access to. See chrome.fileSystem API docs: https://developer.chrome.com/apps/fileSystem#method-retainEntry Chrome extension APIs can already use the service in //apps, but APIs implemented in //extensions cannot (they can't depend on //apps). This change enables moving chrome.fileSystem into //extensions. This CL: * Adds an extensions::SavedFilesServiceInterface, consisting of a few functions from apps::SavedFilesService * Makes apps::SavedFilesService derive from extensions::SavedFilesServiceInterface * Moves apps::SavedFileEntry struct into extensions:: BUG=729713 R=benwells@chromium.org

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -1098 lines) Patch
M apps/BUILD.gn View 1 chunk +2 lines, -2 lines 0 comments Download
M apps/app_restore_service.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M apps/app_restore_service_browsertest.cc View 4 chunks +11 lines, -6 lines 2 comments Download
M apps/browser_context_keyed_service_factories.cc View 2 chunks +4 lines, -3 lines 0 comments Download
D apps/saved_files_service.h View 1 chunk +0 lines, -146 lines 0 comments Download
D apps/saved_files_service.cc View 1 chunk +0 lines, -443 lines 0 comments Download
M apps/saved_files_service_factory.h View 1 1 chunk +0 lines, -41 lines 0 comments Download
M apps/saved_files_service_factory.cc View 1 1 chunk +0 lines, -44 lines 0 comments Download
A + apps/saved_files_service_impl.h View 5 chunks +28 lines, -62 lines 0 comments Download
A + apps/saved_files_service_impl.cc View 21 chunks +81 lines, -92 lines 0 comments Download
A + apps/saved_files_service_impl_factory.h View 1 1 chunk +9 lines, -9 lines 0 comments Download
A + apps/saved_files_service_impl_factory.cc View 1 1 chunk +13 lines, -12 lines 0 comments Download
M apps/saved_files_service_unittest.cc View 1 12 chunks +23 lines, -23 lines 0 comments Download
M chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.h View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.cc View 7 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_apitest.cc View 7 chunks +15 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc View 5 chunks +14 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M extensions/browser/api/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A + extensions/browser/api/file_system/BUILD.gn View 1 chunk +4 lines, -52 lines 0 comments Download
A + extensions/browser/api/file_system/saved_files_service.h View 1 1 chunk +38 lines, -113 lines 0 comments Download
A extensions/browser/api/file_system/saved_files_service.cc View 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (3 generated)
michaelpg
PTAL. I believe this allows for what you suggested in https://codereview.chromium.org/2934143002/diff/60001/extensions/browser/api/file_system/file_system_api.cc#newcode883
3 years, 6 months ago (2017-06-20 23:24:20 UTC) #2
benwells
https://codereview.chromium.org/2951003002/diff/20001/apps/app_restore_service_browsertest.cc File apps/app_restore_service_browsertest.cc (right): https://codereview.chromium.org/2951003002/diff/20001/apps/app_restore_service_browsertest.cc#newcode136 apps/app_restore_service_browsertest.cc:136: SavedFilesServiceImpl* saved_files_service = Hmmm ... getting an Impl class ...
3 years, 6 months ago (2017-06-22 07:56:09 UTC) #3
michaelpg
3 years, 6 months ago (2017-06-23 20:44:04 UTC) #6
Message was sent while issue was closed.
Rietveld is forcing me to create a new issue for this for some reason, so I've
closed this one and uploaded to https://codereview.chromium.org/2960433002/.

https://codereview.chromium.org/2951003002/diff/20001/apps/app_restore_servic...
File apps/app_restore_service_browsertest.cc (right):

https://codereview.chromium.org/2951003002/diff/20001/apps/app_restore_servic...
apps/app_restore_service_browsertest.cc:136: SavedFilesServiceImpl*
saved_files_service =
On 2017/06/22 07:56:09, benwells wrote:
> Hmmm ... getting an Impl class like this looks a bit strange. After seeing
this
> I think the second suggestion I had wrt naming would be better.
> 
> That is, keep SavedFilesService as it is (i.e. no SavedFilesService) but
> introduce a SavedFilesServiceInterface.
> 
> Then users of the class would not be dealing with Impls but 'proper' classes.
It
> would also make the fallout from this change much less.
> 
> WDYT?
> 
> PS sorry to be a pain.

Done. It does make the change tighter, thanks. I also reverted the
SavedFileEntry => ::Entry change because SavedFilesServiceInterface::Entry was a
bit much. SavedFileEntry now has its own header file though.

Powered by Google App Engine
This is Rietveld 408576698