| 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 9947a9ca5284df36a1270ad6dc0f81aa594509e7..9382d0c3e46f388781729888337f800f9f45fd53 100644
|
| --- a/chrome/browser/extensions/api/file_system/file_system_api.h
|
| +++ b/chrome/browser/extensions/api/file_system/file_system_api.h
|
| @@ -50,13 +50,15 @@ class ConsentProvider {
|
| enum Consent { CONSENT_GRANTED, CONSENT_REJECTED, CONSENT_IMPOSSIBLE };
|
|
|
| typedef base::Callback<void(Consent)> ConsentCallback;
|
| - typedef base::Callback<
|
| - void(const file_manager::VolumeInfo&, bool, const ConsentCallback&)>
|
| - UserConsentRequestCallback;
|
| + typedef base::Callback<void(const file_manager::VolumeInfo&,
|
| + bool,
|
| + const ConsentCallback&)> AskUserCallback;
|
| + typedef base::Callback<void(const file_manager::VolumeInfo&, bool)>
|
| + NotifyUserCallback;
|
| typedef base::Callback<bool(const Extension&)> IsAutoLaunchedCallback;
|
|
|
| - explicit ConsentProvider(
|
| - const UserConsentRequestCallback& user_consent_request_callback);
|
| + ConsentProvider(const AskUserCallback& ask_user_callback,
|
| + const NotifyUserCallback& notify_user_callback);
|
| ConsentProvider();
|
| ~ConsentProvider();
|
|
|
| @@ -77,7 +79,8 @@ class ConsentProvider {
|
| void SetComponentWhitelistForTesting(const std::set<std::string>& whitelist);
|
|
|
| private:
|
| - const UserConsentRequestCallback user_consent_request_callback_;
|
| + const AskUserCallback ask_user_callback_;
|
| + const NotifyUserCallback notify_user_callback_;
|
| std::set<std::string> component_whitelist_;
|
| IsAutoLaunchedCallback is_auto_launched_callback_;
|
|
|
| @@ -322,11 +325,14 @@ class FileSystemRequestFileSystemFunction : public UIThreadExtensionFunction {
|
|
|
| #if defined(OS_CHROMEOS)
|
| // Requests user consent for accessing the volume identified by |name|.
|
| - void OnUserConsentRequested(
|
| + void OnAskUser(
|
| const file_manager::VolumeInfo& volume_info,
|
| bool writable,
|
| const file_system_api::ConsentProvider::ConsentCallback& callback);
|
|
|
| + // Notifies user about automatically granted permissions for a kiosk app.
|
| + void OnNotifyUser(const file_manager::VolumeInfo& volume_info, bool writable);
|
| +
|
| // Called when the consent dialog is classed, and executed |callback| with
|
| // a consent result.
|
| void OnUserConsentDialogClosed(
|
|
|