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

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

Issue 2494633004: Remove about:srcdoc url conversion. (Closed)
Patch Set: Fix tests with about::blank Created 4 years, 1 month 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 content::BrowserContext* browser_context, 152 content::BrowserContext* browser_context,
153 const GURL& url); 153 const GURL& url);
154 154
155 // Return whether both URLs are part of the same web site, for the purpose of 155 // Return whether both URLs are part of the same web site, for the purpose of
156 // assigning them to processes accordingly. The decision is currently based 156 // assigning them to processes accordingly. The decision is currently based
157 // on the registered domain of the URLs (google.com, bbc.co.uk), as well as 157 // on the registered domain of the URLs (google.com, bbc.co.uk), as well as
158 // the scheme (https, http). This ensures that two pages will be in 158 // the scheme (https, http). This ensures that two pages will be in
159 // the same process if they can communicate with other via JavaScript. 159 // the same process if they can communicate with other via JavaScript.
160 // (e.g., docs.google.com and mail.google.com have DOM access to each other 160 // (e.g., docs.google.com and mail.google.com have DOM access to each other
161 // if they both set their document.domain properties to google.com.) 161 // if they both set their document.domain properties to google.com.)
162 // Note that if the destination is a blank page, we consider that to be part 162 // Note that if the destination is about:blank or about:srcdoc, we consider
Charlie Reis 2016/11/22 01:01:20 Let's leave this out.
arthursonzogni 2016/11/22 16:43:27 Done.
163 // of the same web site for the purposes for process assignment. 163 // that to be part of the same web site for the purposes for process
164 // assignment.
164 static bool IsSameWebSite(content::BrowserContext* browser_context, 165 static bool IsSameWebSite(content::BrowserContext* browser_context,
165 const GURL& src_url, 166 const GURL& src_url,
166 const GURL& dest_url); 167 const GURL& dest_url);
167 168
168 // Returns the site for the given URL, which includes only the scheme and 169 // Returns the site for the given URL, which includes only the scheme and
169 // registered domain. Returns an empty GURL if the URL has no host. 170 // registered domain. Returns an empty GURL if the URL has no host.
170 static GURL GetSiteForURL(BrowserContext* context, const GURL& url); 171 static GURL GetSiteForURL(BrowserContext* context, const GURL& url);
171 172
172 protected: 173 protected:
173 friend class base::RefCounted<SiteInstance>; 174 friend class base::RefCounted<SiteInstance>;
174 175
175 SiteInstance() {} 176 SiteInstance() {}
176 virtual ~SiteInstance() {} 177 virtual ~SiteInstance() {}
177 }; 178 };
178 179
179 } // namespace content. 180 } // namespace content.
180 181
181 #endif // CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_ 182 #endif // CONTENT_PUBLIC_BROWSER_SITE_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698