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

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

Issue 9147051: Don't swap processes for javascript: URLs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed the unit test and restored the function to not be virtual. Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "content/browser/renderer_host/render_process_host_impl.h" 9 #include "content/browser/renderer_host/render_process_host_impl.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // 67 //
68 // The factory must outlive the SiteInstance; ownership is not transferred. It 68 // The factory must outlive the SiteInstance; ownership is not transferred. It
69 // may be NULL, in which case the default BrowserRenderProcessHost will be 69 // may be NULL, in which case the default BrowserRenderProcessHost will be
70 // created (this is the behavior if you don't call this function). 70 // created (this is the behavior if you don't call this function).
71 void set_render_process_host_factory( 71 void set_render_process_host_factory(
72 content::RenderProcessHostFactory* rph_factory) { 72 content::RenderProcessHostFactory* rph_factory) {
73 render_process_host_factory_ = rph_factory; 73 render_process_host_factory_ = rph_factory;
74 } 74 }
75 75
76 // Whether this SiteInstance has a running process associated with it. 76 // Whether this SiteInstance has a running process associated with it.
77 // Virtual to allow tests to extend it.
Charlie Reis 2012/01/13 18:37:46 No longer need this comment.
nasko 2012/01/13 20:54:49 Done.
77 bool HasProcess() const; 78 bool HasProcess() const;
78 79
79 // Returns the current process being used to render pages in this 80 // Returns the current process being used to render pages in this
80 // SiteInstance. If the process has crashed or otherwise gone away, then 81 // SiteInstance. If the process has crashed or otherwise gone away, then
81 // this method will create a new process and update our host ID accordingly. 82 // this method will create a new process and update our host ID accordingly.
82 content::RenderProcessHost* GetProcess(); 83 content::RenderProcessHost* GetProcess();
83 84
84 // Set / Get the web site that this SiteInstance is rendering pages for. 85 // Set / Get the web site that this SiteInstance is rendering pages for.
85 // This includes the scheme and registered domain, but not the port. If the 86 // This includes the scheme and registered domain, but not the port. If the
86 // URL does not have a valid registered domain, then the full hostname is 87 // URL does not have a valid registered domain, then the full hostname is
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // The web site that this SiteInstance is rendering pages for. 193 // The web site that this SiteInstance is rendering pages for.
193 GURL site_; 194 GURL site_;
194 195
195 // Whether SetSite has been called. 196 // Whether SetSite has been called.
196 bool has_site_; 197 bool has_site_;
197 198
198 DISALLOW_COPY_AND_ASSIGN(SiteInstance); 199 DISALLOW_COPY_AND_ASSIGN(SiteInstance);
199 }; 200 };
200 201
201 #endif // CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ 202 #endif // CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/site_instance.cc » ('j') | content/browser/site_instance_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698