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

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: Attempt to fix clang compile warning. 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 fe8fb358060b07f154868a01334a0a1eb8f62eb7..71312872069ae7f9477c902f65101c50f7b01624 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 not otherwise depend on the siteinstance's site URL,
nasko 2015/09/04 22:19:43 nit: double not, SiteInstance
ncarter (slow) 2015/09/10 19:08:59 Done.
+ // since it's value reflects the current process model, and this function
nasko 2015/09/04 22:19:43 nit: its
ncarter (slow) 2015/09/10 19:08:59 Done.
+ // ought to 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