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

Side by Side Diff: content/public/browser/site_instance.h

Issue 378743002: Navigation transitions: Place transition page in same process as destination page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clang build. Created 6 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 unified diff | Download patch
« no previous file with comments | « content/browser/transition_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_
6 #define CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ 6 #define CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 static SiteInstance* CreateForURL( 128 static SiteInstance* CreateForURL(
129 content::BrowserContext* browser_context, const GURL& url); 129 content::BrowserContext* browser_context, const GURL& url);
130 130
131 // Return whether both URLs are part of the same web site, for the purpose of 131 // Return whether both URLs are part of the same web site, for the purpose of
132 // assigning them to processes accordingly. The decision is currently based 132 // assigning them to processes accordingly. The decision is currently based
133 // on the registered domain of the URLs (google.com, bbc.co.uk), as well as 133 // on the registered domain of the URLs (google.com, bbc.co.uk), as well as
134 // the scheme (https, http). This ensures that two pages will be in 134 // the scheme (https, http). This ensures that two pages will be in
135 // the same process if they can communicate with other via JavaScript. 135 // the same process if they can communicate with other via JavaScript.
136 // (e.g., docs.google.com and mail.google.com have DOM access to each other 136 // (e.g., docs.google.com and mail.google.com have DOM access to each other
137 // if they both set their document.domain properties to google.com.) 137 // if they both set their document.domain properties to google.com.)
138 // Note that if the destination is a blank page, we consider that to be part
139 // of the same web site for the purposes for process assignment.
138 static bool IsSameWebSite(content::BrowserContext* browser_context, 140 static bool IsSameWebSite(content::BrowserContext* browser_context,
139 const GURL& url1, const GURL& url2); 141 const GURL& src_url,
142 const GURL& dest_url);
140 143
141 // Returns the site for the given URL, which includes only the scheme and 144 // Returns the site for the given URL, which includes only the scheme and
142 // registered domain. Returns an empty GURL if the URL has no host. 145 // registered domain. Returns an empty GURL if the URL has no host.
143 static GURL GetSiteForURL(BrowserContext* context, const GURL& url); 146 static GURL GetSiteForURL(BrowserContext* context, const GURL& url);
144 147
145 protected: 148 protected:
146 friend class base::RefCounted<SiteInstance>; 149 friend class base::RefCounted<SiteInstance>;
147 150
148 SiteInstance() {} 151 SiteInstance() {}
149 virtual ~SiteInstance() {} 152 virtual ~SiteInstance() {}
150 }; 153 };
151 154
152 } // namespace content. 155 } // namespace content.
153 156
154 #endif // CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ 157 #endif // CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_
OLDNEW
« no previous file with comments | « content/browser/transition_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698