| Index: chrome/browser/extensions/api/tabs/tabs_api.cc
|
| diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| index c4ba43b1470424f0a205dc72f038019dbf13c6a7..671330f00b25a682c3698e0281c9e864e7c6c25c 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| @@ -625,8 +625,10 @@ bool WindowsCreateFunction::RunImpl() {
|
| else
|
| new_window->window()->ShowInactive();
|
|
|
| - if (new_window->profile()->IsOffTheRecord() && !include_incognito()) {
|
| - // Don't expose incognito windows if the extension isn't allowed.
|
| + if (new_window->profile()->IsOffTheRecord() &&
|
| + !GetProfile()->IsOffTheRecord() && !include_incognito()) {
|
| + // Don't expose incognito windows if extension itself works in non-incognito
|
| + // profile and CanCrossIncognito isn't allowed.
|
| SetResult(Value::CreateNullValue());
|
| } else {
|
| SetResult(
|
|
|