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

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

Issue 3210007: Add support for a "split" incognito behavior for extensions. (Closed)
Patch Set: latest Created 10 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
Index: chrome/browser/extensions/extension_cookies_api.cc
diff --git a/chrome/browser/extensions/extension_cookies_api.cc b/chrome/browser/extensions/extension_cookies_api.cc
index f50d47595d9bb3e96f31ef91b570eae2d0e6157e..5a2d45674b285405396003f8e1efb368d577ea7a 100644
--- a/chrome/browser/extensions/extension_cookies_api.cc
+++ b/chrome/browser/extensions/extension_cookies_api.cc
@@ -76,7 +76,7 @@ void ExtensionCookiesEventRouter::DispatchEvent(Profile* profile,
GURL& cookie_domain) {
if (profile && profile->GetExtensionMessageService()) {
profile->GetExtensionMessageService()->DispatchEventToRenderers(
- event_name, json_args, profile->IsOffTheRecord(), cookie_domain);
+ event_name, json_args, profile, cookie_domain);
}
}
@@ -405,7 +405,7 @@ bool RemoveCookieFunction::RunImpl() {
}
bool GetAllCookieStoresFunction::RunImpl() {
- Profile* original_profile = profile()->GetOriginalProfile();
+ Profile* original_profile = profile();
DCHECK(original_profile);
scoped_ptr<ListValue> original_tab_ids(new ListValue());
Profile* incognito_profile = NULL;
@@ -415,6 +415,8 @@ bool GetAllCookieStoresFunction::RunImpl() {
if (incognito_profile)
incognito_tab_ids.reset(new ListValue());
}
+ DCHECK(original_profile != incognito_profile);
+
// Iterate through all browser instances, and for each browser,
// add its tab IDs to either the regular or incognito tab ID list depending
// whether the browser is regular or incognito.
« no previous file with comments | « chrome/browser/extensions/extension_browser_event_router.cc ('k') | chrome/browser/extensions/extension_cookies_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698