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

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

Issue 1144253003: Remove --enable-strict-site-isolation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Charlie's fixes Created 5 years, 6 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) 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"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 GetEffectiveURL(browser_context, url); 334 GetEffectiveURL(browser_context, url);
335 } 335 }
336 336
337 void SiteInstanceImpl::RenderProcessHostDestroyed(RenderProcessHost* host) { 337 void SiteInstanceImpl::RenderProcessHostDestroyed(RenderProcessHost* host) {
338 DCHECK_EQ(process_, host); 338 DCHECK_EQ(process_, host);
339 process_->RemoveObserver(this); 339 process_->RemoveObserver(this);
340 process_ = NULL; 340 process_ = NULL;
341 } 341 }
342 342
343 void SiteInstanceImpl::LockToOrigin() { 343 void SiteInstanceImpl::LockToOrigin() {
344 // We currently only restrict this process to a particular site if the 344 // We currently only restrict this process to a particular site if --site-per-
345 // --enable-strict-site-isolation or --site-per-process flags are present. 345 // process flag is present.
346 const base::CommandLine& command_line = 346 const base::CommandLine& command_line =
347 *base::CommandLine::ForCurrentProcess(); 347 *base::CommandLine::ForCurrentProcess();
348 if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation) || 348 if (command_line.HasSwitch(switches::kSitePerProcess)) {
349 command_line.HasSwitch(switches::kSitePerProcess)) {
350 ChildProcessSecurityPolicyImpl* policy = 349 ChildProcessSecurityPolicyImpl* policy =
351 ChildProcessSecurityPolicyImpl::GetInstance(); 350 ChildProcessSecurityPolicyImpl::GetInstance();
352 policy->LockToOrigin(process_->GetID(), site_); 351 policy->LockToOrigin(process_->GetID(), site_);
353 } 352 }
354 } 353 }
355 354
356 } // namespace content 355 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_unittest.cc ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698