| Index: chrome/browser/extensions/extension_cookies_helpers.cc
|
| diff --git a/chrome/browser/extensions/extension_cookies_helpers.cc b/chrome/browser/extensions/extension_cookies_helpers.cc
|
| index 2aedb5f800da82049e10666c4043660aa00cfcde..52368e964b736085bd20e5edf53d5256c72a9218 100644
|
| --- a/chrome/browser/extensions/extension_cookies_helpers.cc
|
| +++ b/chrome/browser/extensions/extension_cookies_helpers.cc
|
| @@ -27,9 +27,11 @@ Profile* ChooseProfileFromStoreId(const std::string& store_id,
|
| Profile* profile,
|
| bool include_incognito) {
|
| DCHECK(profile);
|
| - if (store_id == kOriginalProfileStoreId)
|
| + bool allow_original = !profile->IsOffTheRecord();
|
| + bool allow_incognito = profile->IsOffTheRecord() || include_incognito;
|
| + if (store_id == kOriginalProfileStoreId && allow_original)
|
| return profile->GetOriginalProfile();
|
| - if (store_id == kOffTheRecordProfileStoreId && include_incognito)
|
| + if (store_id == kOffTheRecordProfileStoreId && allow_incognito)
|
| return profile->GetOffTheRecordProfile();
|
| return NULL;
|
| }
|
|
|