diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 13:39:02 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 13:39:02 +0000 |
commit | 72daaa97d67f7c722eaf9eabf125427506ee8d45 (patch) | |
tree | 23e2d82b58b9e48061283ba6f2045f4b3864b668 /content/browser/site_instance.h | |
parent | 9e855c0a40e07fa78d9abb4961b35e750627caf4 (diff) | |
download | chromium_src-72daaa97d67f7c722eaf9eabf125427506ee8d45.zip chromium_src-72daaa97d67f7c722eaf9eabf125427506ee8d45.tar.gz chromium_src-72daaa97d67f7c722eaf9eabf125427506ee8d45.tar.bz2 |
Hide BrowsingInstance from all but SiteInstance, as intended by design.
See comment on BrowsingInstance class that explains it should only be
visible to SiteInstance. By restoring this design, we also eliminate
one Chrome->Content dependency.
TBR=ben@chromium.org
BUG=98716
Review URL: http://codereview.chromium.org/9221017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/site_instance.h')
-rw-r--r-- | content/browser/site_instance.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/content/browser/site_instance.h b/content/browser/site_instance.h index b85aa9a..2a40762 100644 --- a/content/browser/site_instance.h +++ b/content/browser/site_instance.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -59,9 +59,6 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance>, // Returns a unique ID for this SiteInstance. int32 id() { return id_; } - // Get the BrowsingInstance to which this SiteInstance belongs. - BrowsingInstance* browsing_instance() { return browsing_instance_; } - // Sets the factory used to create new RenderProcessHosts. This will also be // passed on to SiteInstances spawned by this one. // @@ -110,6 +107,10 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance>, // navigating to the URL. bool HasWrongProcessForURL(const GURL& url) const; + // Browser context to which this SiteInstance (and all related + // SiteInstances) belongs. + content::BrowserContext* GetBrowserContext() const; + // Factory method to create a new SiteInstance. This will create a new // new BrowsingInstance, so it should only be used when creating a new tab // from scratch (or similar circumstances). Callers should ensure that @@ -195,6 +196,8 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance>, // Whether SetSite has been called. bool has_site_; + FRIEND_TEST_ALL_PREFIXES(RenderViewHostManagerTest, NewTabPageProcesses); + DISALLOW_COPY_AND_ASSIGN(SiteInstance); }; |