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

Unified Diff: chrome/browser/extensions/window_event_router.cc

Issue 10829263: Fixing cross-incognito dispatch of onFocusChanged event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months 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/window_event_router.cc
diff --git a/chrome/browser/extensions/window_event_router.cc b/chrome/browser/extensions/window_event_router.cc
index 427119bf35283f452b4b4b564f3ccb5de532df50..b90e04a29d6cb0a3d24da117fb57550325655913 100644
--- a/chrome/browser/extensions/window_event_router.cc
+++ b/chrome/browser/extensions/window_event_router.cc
@@ -139,11 +139,12 @@ void WindowEventRouter::OnActiveWindowChanged(
// dispatch WINDOW_ID_NONE to extensions whose profile lost focus that
// can't see the new focused window across the incognito boundary.
// See crbug.com/46610.
- scoped_ptr<base::ListValue> none_args(new ListValue());
+ scoped_ptr<base::ListValue> none_args(NULL);
if (focused_profile_ != NULL && previous_focused_profile != NULL &&
focused_profile_ != previous_focused_profile) {
- none_args->Append(
- Value::CreateIntegerValue(extension_misc::kUnknownWindowId));
+ none_args.reset(new ListValue());
+ none_args->Append(Value::CreateIntegerValue(
+ extension_misc::kUnknownWindowId));
}
// Note that we may pass a NULL |window_profile| for the |restrict_to_profile|
« 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