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

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: Don't swap processes for "javascript:" URLs. 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
« no previous file with comments | « no previous file | content/browser/site_instance.cc » ('j') | content/browser/site_instance.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bool HasProcess() const; 77 virtual bool HasProcess() const;
Charlie Reis 2012/01/12 22:01:14 Nit: Let's add "Virtual for testing." to the comme
nasko 2012/01/12 22:47:47 Done.
78 78
79 // Returns the current process being used to render pages in this 79 // Returns the current process being used to render pages in this
80 // SiteInstance. If the process has crashed or otherwise gone away, then 80 // 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. 81 // this method will create a new process and update our host ID accordingly.
82 content::RenderProcessHost* GetProcess(); 82 content::RenderProcessHost* GetProcess();
83 83
84 // Set / Get the web site that this SiteInstance is rendering pages for. 84 // 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 85 // 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 86 // URL does not have a valid registered domain, then the full hostname is
87 // stored. 87 // stored.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // The web site that this SiteInstance is rendering pages for. 192 // The web site that this SiteInstance is rendering pages for.
193 GURL site_; 193 GURL site_;
194 194
195 // Whether SetSite has been called. 195 // Whether SetSite has been called.
196 bool has_site_; 196 bool has_site_;
197 197
198 DISALLOW_COPY_AND_ASSIGN(SiteInstance); 198 DISALLOW_COPY_AND_ASSIGN(SiteInstance);
199 }; 199 };
200 200
201 #endif // CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ 201 #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.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698