| Index: chrome/browser/extensions/extension_tabs_module.cc
|
| diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
|
| index f7d2deac5dd3bc254f9a70a8cbcdc357f15d0984..554a463d9ed358d86d9a09dae9f093968a16f06f 100644
|
| --- a/chrome/browser/extensions/extension_tabs_module.cc
|
| +++ b/chrome/browser/extensions/extension_tabs_module.cc
|
| @@ -19,6 +19,7 @@
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/extensions/extension_tabs_module_constants.h"
|
| #include "chrome/browser/net/url_fixer_upper.h"
|
| +#include "chrome/browser/prefs/incognito_mode_availability_prefs.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/sessions/restore_tab_helper.h"
|
| #include "chrome/browser/tabs/tab_strip_model.h"
|
| @@ -527,7 +528,8 @@ bool CreateWindowFunction::RunImpl() {
|
| if (args->HasKey(keys::kIncognitoKey)) {
|
| EXTENSION_FUNCTION_VALIDATE(args->GetBoolean(keys::kIncognitoKey,
|
| &incognito));
|
| - if (!profile_->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)) {
|
| + if (profile_->GetPrefs()->GetInteger(prefs::kIncognitoModeAvailability) ==
|
| + IncognitoModeAvailabilityPrefs::DISABLED) {
|
| error_ = keys::kIncognitoModeIsDisabled;
|
| return false;
|
| }
|
|
|