Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 49463006: chrome.windows.create should return new window id in Guest mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698