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

Side by Side Diff: content/browser/site_instance_impl.cc

Issue 880303004: [Clean up] Fix the comment for SiteIntance::CreateForURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | 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 #include "content/browser/site_instance_impl.h" 5 #include "content/browser/site_instance_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/browsing_instance.h" 8 #include "content/browser/browsing_instance.h"
9 #include "content/browser/child_process_security_policy_impl.h" 9 #include "content/browser/child_process_security_policy_impl.h"
10 #include "content/browser/frame_host/debug_urls.h" 10 #include "content/browser/frame_host/debug_urls.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 /*static*/ 231 /*static*/
232 SiteInstance* SiteInstance::Create(BrowserContext* browser_context) { 232 SiteInstance* SiteInstance::Create(BrowserContext* browser_context) {
233 return new SiteInstanceImpl(new BrowsingInstance(browser_context)); 233 return new SiteInstanceImpl(new BrowsingInstance(browser_context));
234 } 234 }
235 235
236 /*static*/ 236 /*static*/
237 SiteInstance* SiteInstance::CreateForURL(BrowserContext* browser_context, 237 SiteInstance* SiteInstance::CreateForURL(BrowserContext* browser_context,
238 const GURL& url) { 238 const GURL& url) {
239 // This BrowsingInstance may be deleted if it returns an existing 239 // This will create a new SiteInstance and BrowsingInstance.
240 // SiteInstance.
241 scoped_refptr<BrowsingInstance> instance( 240 scoped_refptr<BrowsingInstance> instance(
242 new BrowsingInstance(browser_context)); 241 new BrowsingInstance(browser_context));
243 return instance->GetSiteInstanceForURL(url); 242 return instance->GetSiteInstanceForURL(url);
244 } 243 }
245 244
246 /*static*/ 245 /*static*/
247 bool SiteInstance::IsSameWebSite(BrowserContext* browser_context, 246 bool SiteInstance::IsSameWebSite(BrowserContext* browser_context,
248 const GURL& real_src_url, 247 const GURL& real_src_url,
249 const GURL& real_dest_url) { 248 const GURL& real_dest_url) {
250 GURL src_url = SiteInstanceImpl::GetEffectiveURL(browser_context, 249 GURL src_url = SiteInstanceImpl::GetEffectiveURL(browser_context,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 *base::CommandLine::ForCurrentProcess(); 347 *base::CommandLine::ForCurrentProcess();
349 if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation) || 348 if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation) ||
350 command_line.HasSwitch(switches::kSitePerProcess)) { 349 command_line.HasSwitch(switches::kSitePerProcess)) {
351 ChildProcessSecurityPolicyImpl* policy = 350 ChildProcessSecurityPolicyImpl* policy =
352 ChildProcessSecurityPolicyImpl::GetInstance(); 351 ChildProcessSecurityPolicyImpl::GetInstance();
353 policy->LockToOrigin(process_->GetID(), site_); 352 policy->LockToOrigin(process_->GetID(), site_);
354 } 353 }
355 } 354 }
356 355
357 } // namespace content 356 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698