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

Side by Side Diff: content/browser/site_instance_impl.cc

Issue 606113005: Move RenderViewHost swap out state to RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review suggestions Created 6 years, 2 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 | « content/browser/site_instance_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/site_instance_impl.h" 5 #include "content/browser/site_instance_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/browsing_instance.h" 8 #include "content/browser/browsing_instance.h"
9 #include "content/browser/child_process_security_policy_impl.h" 9 #include "content/browser/child_process_security_policy_impl.h"
10 #include "content/browser/frame_host/debug_urls.h" 10 #include "content/browser/frame_host/debug_urls.h"
11 #include "content/browser/renderer_host/render_process_host_impl.h" 11 #include "content/browser/renderer_host/render_process_host_impl.h"
12 #include "content/browser/storage_partition_impl.h" 12 #include "content/browser/storage_partition_impl.h"
13 #include "content/public/browser/content_browser_client.h" 13 #include "content/public/browser/content_browser_client.h"
14 #include "content/public/browser/render_process_host_factory.h" 14 #include "content/public/browser/render_process_host_factory.h"
15 #include "content/public/browser/web_ui_controller_factory.h" 15 #include "content/public/browser/web_ui_controller_factory.h"
16 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
17 #include "content/public/common/url_constants.h" 17 #include "content/public/common/url_constants.h"
18 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 18 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
19 19
20 namespace content { 20 namespace content {
21 21
22 const RenderProcessHostFactory* 22 const RenderProcessHostFactory*
23 SiteInstanceImpl::g_render_process_host_factory_ = NULL; 23 SiteInstanceImpl::g_render_process_host_factory_ = NULL;
24 int32 SiteInstanceImpl::next_site_instance_id_ = 1; 24 int32 SiteInstanceImpl::next_site_instance_id_ = 1;
25 25
26 SiteInstanceImpl::SiteInstanceImpl(BrowsingInstance* browsing_instance) 26 SiteInstanceImpl::SiteInstanceImpl(BrowsingInstance* browsing_instance)
27 : id_(next_site_instance_id_++), 27 : id_(next_site_instance_id_++),
28 active_view_count_(0), 28 active_frame_count_(0),
29 browsing_instance_(browsing_instance), 29 browsing_instance_(browsing_instance),
30 process_(NULL), 30 process_(NULL),
31 has_site_(false) { 31 has_site_(false) {
32 DCHECK(browsing_instance); 32 DCHECK(browsing_instance);
33 } 33 }
34 34
35 SiteInstanceImpl::~SiteInstanceImpl() { 35 SiteInstanceImpl::~SiteInstanceImpl() {
36 GetContentClient()->browser()->SiteInstanceDeleting(this); 36 GetContentClient()->browser()->SiteInstanceDeleting(this);
37 37
38 if (process_) 38 if (process_)
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 *base::CommandLine::ForCurrentProcess(); 345 *base::CommandLine::ForCurrentProcess();
346 if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation) || 346 if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation) ||
347 command_line.HasSwitch(switches::kSitePerProcess)) { 347 command_line.HasSwitch(switches::kSitePerProcess)) {
348 ChildProcessSecurityPolicyImpl* policy = 348 ChildProcessSecurityPolicyImpl* policy =
349 ChildProcessSecurityPolicyImpl::GetInstance(); 349 ChildProcessSecurityPolicyImpl::GetInstance();
350 policy->LockToOrigin(process_->GetID(), site_); 350 policy->LockToOrigin(process_->GetID(), site_);
351 } 351 }
352 } 352 }
353 353
354 } // namespace content 354 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_instance_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698