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

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: Strings committed separately. Rebased. Created 5 years, 9 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
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 0c468435fd6d809410da2ab63736fa0512bc887d..3b3519494e8b1cd70ebee7fa8a7d9481d8dfddf1 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);

Powered by Google App Engine
This is Rietveld 408576698