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

Unified Diff: content/browser/site_instance_impl.h

Issue 1845233003: SiteInstance unittest improvements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@doghouse_now
Patch Set: Add missing #include for FRIEND_TEST Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browsing_instance.h ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_instance_impl.h
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index 935fc2982c2f685a9a05543f3e15db64b27a1746..9089a02ab89c4a7ec8983b2cd35fd22dca5ba034 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -20,8 +20,8 @@ namespace content {
class BrowsingInstance;
class RenderProcessHostFactory;
-class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
- public RenderProcessHostObserver {
+class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
+ public RenderProcessHostObserver {
public:
class CONTENT_EXPORT Observer {
public:
@@ -129,23 +129,16 @@ class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
static bool DoesSiteRequireDedicatedProcess(BrowserContext* browser_context,
const GURL& effective_url);
- protected:
+ private:
friend class BrowsingInstance;
+ friend class SiteInstanceTestBrowserClient;
- // Virtual to allow tests to extend it.
- ~SiteInstanceImpl() override;
-
- // Create a new SiteInstance. Protected to give access to BrowsingInstance
- // and tests; most callers should use Create or GetRelatedSiteInstance
- // instead.
+ // Create a new SiteInstance. Only BrowsingInstance should call this
+ // directly; clients should use Create() or GetRelatedSiteInstance() instead.
explicit SiteInstanceImpl(BrowsingInstance* browsing_instance);
- // Only BrowsingInstance should call this.
- void set_is_default_subframe_site_instance() {
- is_default_subframe_site_instance_ = true;
- }
+ ~SiteInstanceImpl() override;
- private:
// RenderProcessHostObserver implementation.
void RenderProcessHostDestroyed(RenderProcessHost* host) override;
void RenderProcessWillExit(RenderProcessHost* host) override;
@@ -156,6 +149,10 @@ class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
// Used to restrict a process' origin access rights.
void LockToOrigin();
+ void set_is_default_subframe_site_instance() {
+ is_default_subframe_site_instance_ = true;
+ }
+
// An object used to construct RenderProcessHosts.
static const RenderProcessHostFactory* g_render_process_host_factory_;
« no previous file with comments | « content/browser/browsing_instance.h ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698