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

Unified Diff: chrome/browser/extensions/api/file_system/file_system_api.h

Issue 1032313002: Add a notification about auto-granted access to file systems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/file_system/file_system_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/file_system/file_system_api.h
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.h b/chrome/browser/extensions/api/file_system/file_system_api.h
index 7ae7c386f28858da8f5a9e12593c7f97fc5a80b5..c6a6e9fb6fa941e97e950cddc2ad3add0fbe4880 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.h
+++ b/chrome/browser/extensions/api/file_system/file_system_api.h
@@ -61,10 +61,16 @@ class ConsentProvider {
public:
// Shows a dialog for granting permissions.
virtual void ShowDialog(const extensions::Extension& extension,
- base::WeakPtr<file_manager::Volume> volume,
+ const base::WeakPtr<file_manager::Volume>& volume,
bool writable,
const ShowDialogCallback& callback) = 0;
+ // Shows a notification about permissions automatically granted access.
+ virtual void ShowNotification(
+ const extensions::Extension& extension,
+ const base::WeakPtr<file_manager::Volume>& volume,
+ bool writable) = 0;
+
// Checks if the extension was launched in auto-launch kiosk mode.
virtual bool IsAutoLaunched(const extensions::Extension& extension) = 0;
@@ -80,7 +86,7 @@ class ConsentProvider {
// volume by the |extension|. Must be called only if the extension is
// grantable, which can be checked with IsGrantable().
void RequestConsent(const extensions::Extension& extension,
- base::WeakPtr<file_manager::Volume> volume,
+ const base::WeakPtr<file_manager::Volume>& volume,
bool writable,
const ConsentCallback& callback);
@@ -114,10 +120,13 @@ class ConsentProviderDelegate : public ConsentProvider::DelegateInterface {
// ConsentProvider::DelegateInterface overrides:
void ShowDialog(const extensions::Extension& extension,
- base::WeakPtr<file_manager::Volume> volume,
+ const base::WeakPtr<file_manager::Volume>& volume,
bool writable,
const file_system_api::ConsentProvider::ShowDialogCallback&
callback) override;
+ void ShowNotification(const extensions::Extension& extension,
+ const base::WeakPtr<file_manager::Volume>& volume,
+ bool writable) override;
bool IsAutoLaunched(const extensions::Extension& extension) override;
bool IsWhitelistedComponent(const extensions::Extension& extension) override;
@@ -378,7 +387,7 @@ class FileSystemRequestFileSystemFunction : public UIThreadExtensionFunction {
private:
// Called when a user grants or rejects permissions for the file system
// access.
- void OnConsentReceived(base::WeakPtr<file_manager::Volume> volume,
+ void OnConsentReceived(const base::WeakPtr<file_manager::Volume>& volume,
bool writable,
file_system_api::ConsentProvider::Consent result);
« no previous file with comments | « no previous file | chrome/browser/extensions/api/file_system/file_system_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698