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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1313863006: Add SiteIsolation.IsolateExtensions metrics and tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix "not not" Created 5 years, 3 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 722230a99199d0d627ebdec0efd75839e726b3f9..afbf3db6f005640a998e8b0fc6c3b1648cd2ee67 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -170,6 +170,14 @@ void NotifyCacheOnIO(
bool CollectSites(BrowserContext* context,
std::set<GURL>* sites,
FrameTreeNode* node) {
+ // Record about:blank as a real (process-having) site only if the SiteInstance
+ // is unassigned. Do not otherwise depend on the siteinstance's site URL,
+ // since its value reflects the current process model, and this function
+ // should behave identically across all process models.
+ if (node->current_url() == GURL(url::kAboutBlankURL) &&
+ node->current_frame_host()->GetSiteInstance()->HasSite()) {
+ return true;
+ }
sites->insert(SiteInstance::GetSiteForURL(context, node->current_url()));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698