| Index: chrome/browser/extensions/api/developer_private/developer_private_api.cc
|
| diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
|
| index 31404b972d60ccf800313ee0c39bfb36d1461c66..488484503e0c990e1f96d7e0138df92d12945e6a 100644
|
| --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
|
| +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
|
| @@ -408,6 +408,29 @@ bool DeveloperPrivateAllowFileAccessFunction::RunImpl() {
|
| DeveloperPrivateAllowFileAccessFunction::
|
| ~DeveloperPrivateAllowFileAccessFunction() {}
|
|
|
| +bool DeveloperPrivateAllowIncognitoFunction::RunImpl() {
|
| + std::string extension_id;
|
| + bool allow = false;
|
| + EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &extension_id));
|
| + EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(1, &allow));
|
| +
|
| + ExtensionService* service = profile()->GetExtensionService();
|
| + const Extension* extension = service->GetInstalledExtension(extension_id);
|
| + bool result = true;
|
| +
|
| + if (!extension) {
|
| + result = false;
|
| + } else {
|
| + service->SetIsIncognitoEnabled(extension->id(), allow);
|
| + }
|
| +
|
| + return result;
|
| +}
|
| +
|
| +DeveloperPrivateAllowIncognitoFunction::
|
| + ~DeveloperPrivateAllowIncognitoFunction() {}
|
| +
|
| +
|
| bool DeveloperPrivateReloadFunction::RunImpl() {
|
| std::string extension_id;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &extension_id));
|
|
|