| Index: chrome/browser/extensions/api/app/app_api.cc
|
| diff --git a/chrome/browser/extensions/api/app/app_api.cc b/chrome/browser/extensions/api/app/app_api.cc
|
| index a03c603df119403b9dc9a9abf7b45a34d890326d..663b59bfd066ab55dc7311f1c70244dd98803714 100644
|
| --- a/chrome/browser/extensions/api/app/app_api.cc
|
| +++ b/chrome/browser/extensions/api/app/app_api.cc
|
| @@ -23,8 +23,16 @@ const char kInvalidExtensionIdError[] =
|
| "Invalid extension id";
|
| const char kMissingLinkTextError[] =
|
| "You must specify linkText if you use linkUrl";
|
| +const char kIncognitoError[] =
|
| + "This API is not accessible by 'split' mode "
|
| + "extensions in incognito windows.";
|
|
|
| bool AppNotifyFunction::RunImpl() {
|
| + if (!include_incognito() && profile_->IsOffTheRecord()) {
|
| + error_ = kIncognitoError;
|
| + return false;
|
| + }
|
| +
|
| DictionaryValue* details;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details));
|
| EXTENSION_FUNCTION_VALIDATE(details != NULL);
|
| @@ -77,6 +85,11 @@ bool AppNotifyFunction::RunImpl() {
|
| }
|
|
|
| bool AppClearAllNotificationsFunction::RunImpl() {
|
| + if (!include_incognito() && profile_->IsOffTheRecord()) {
|
| + error_ = kIncognitoError;
|
| + return false;
|
| + }
|
| +
|
| std::string id = extension_id();
|
| DictionaryValue* details = NULL;
|
| if (args_->GetDictionary(0, &details) && details->HasKey(kExtensionIdKey)) {
|
|
|