Commit 9f9a5353 authored by jinlong.zhai's avatar jinlong.zhai Committed by Commit bot

[Clean up] Fix the comment for SiteIntance::CreateForURL

In SiteIntance::CreateForURL there will certainly create a new SiteInstance
and BrowsingIntance since in this new BrowsingIntance we will not find any
existing SiteIntance. So BrowsingIntance will never be deleted even beyond
the scope of the method.
The original comments will make some confusion.

BUG=11629

Review URL: https://codereview.chromium.org/880303004

Cr-Commit-Position: refs/heads/master@{#315308}
parent 1418c125
...@@ -236,8 +236,7 @@ SiteInstance* SiteInstance::Create(BrowserContext* browser_context) { ...@@ -236,8 +236,7 @@ SiteInstance* SiteInstance::Create(BrowserContext* browser_context) {
/*static*/ /*static*/
SiteInstance* SiteInstance::CreateForURL(BrowserContext* browser_context, SiteInstance* SiteInstance::CreateForURL(BrowserContext* browser_context,
const GURL& url) { const GURL& url) {
// This BrowsingInstance may be deleted if it returns an existing // This will create a new SiteInstance and BrowsingInstance.
// SiteInstance.
scoped_refptr<BrowsingInstance> instance( scoped_refptr<BrowsingInstance> instance(
new BrowsingInstance(browser_context)); new BrowsingInstance(browser_context));
return instance->GetSiteInstanceForURL(url); return instance->GetSiteInstanceForURL(url);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment