diff options
author | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 05:15:02 +0000 |
---|---|---|
committer | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 05:15:02 +0000 |
commit | a2886e8bc4e24130d17913dcb2bc7f0a14bdc075 (patch) | |
tree | 19d84c149a0b9d3802ce84d0ee63fdef65553d2b /apps/app_restore_service.cc | |
parent | 7a57fe9b6f671badaec02d6c9681adc62950bf32 (diff) | |
download | chromium_src-a2886e8bc4e24130d17913dcb2bc7f0a14bdc075.zip chromium_src-a2886e8bc4e24130d17913dcb2bc7f0a14bdc075.tar.gz chromium_src-a2886e8bc4e24130d17913dcb2bc7f0a14bdc075.tar.bz2 |
Display the list of retained files in the extension permissions dialog.
The dialog allows the user to revoke access for the app, restarting it
if it's currently running. If the app/extension has not retained access
to any files, the dialog is unchanged.
[Mac] XIB change:
- Enable "Show Vertical Scroller" for the scroll view.
Dialog screenshots: https://code.google.com/p/chromium/issues/detail?id=224684#c6
BUG=224684
TEST=Install an app that uses chrome.fileSystem.retainEntry and open a
file with it. In chrome://extensions/ click the permissions link for
that app. The filename should be listed.
Review URL: https://chromiumcodereview.appspot.com/15943007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/app_restore_service.cc')
-rw-r--r-- | apps/app_restore_service.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/app_restore_service.cc b/apps/app_restore_service.cc index 88ac811..37a463b 100644 --- a/apps/app_restore_service.cc +++ b/apps/app_restore_service.cc @@ -4,6 +4,7 @@ #include "apps/app_restore_service.h" +#include "apps/app_restore_service_factory.h" #include "apps/saved_files_service.h" #include "chrome/browser/extensions/api/app_runtime/app_runtime_api.h" #include "chrome/browser/extensions/event_router.h" @@ -84,6 +85,16 @@ void AppRestoreService::HandleStartup(bool should_restore_apps) { } } +bool AppRestoreService::IsAppRestorable(const std::string& extension_id) { + return extensions::ExtensionPrefs::Get(profile_) ->IsExtensionRunning( + extension_id); +} + +// static +AppRestoreService* AppRestoreService::Get(Profile* profile) { + return apps::AppRestoreServiceFactory::GetForProfile(profile); +} + void AppRestoreService::Observe(int type, const content::NotificationSource& source, const content::NotificationDetails& details) { |