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

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

Issue 1212163007: Kill renderers for bad password forms in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 *base::CommandLine::ForCurrentProcess(); 347 *base::CommandLine::ForCurrentProcess();
348 if (command_line.HasSwitch(switches::kSitePerProcess)) { 348 if (command_line.HasSwitch(switches::kSitePerProcess)) {
349 // Guest processes cannot be locked to its site because guests always have 349 // Guest processes cannot be locked to its site because guests always have
350 // a fixed SiteInstance. The site of GURLs a guest loads doesn't match that 350 // a fixed SiteInstance. The site of GURLs a guest loads doesn't match that
351 // SiteInstance. So we skip locking the guest process to the site. 351 // SiteInstance. So we skip locking the guest process to the site.
352 // TODO(ncarter): Remove this exclusion once we can make origin lock per 352 // TODO(ncarter): Remove this exclusion once we can make origin lock per
353 // RenderFrame routing id. 353 // RenderFrame routing id.
354 if (site_.SchemeIs(content::kGuestScheme)) 354 if (site_.SchemeIs(content::kGuestScheme))
355 return; 355 return;
356 356
357 // TODO(creis, nick) https://crbug.com/510588 Chrome UI pages use the same
358 // site (chrome://chrome), so they can't be locked because the site being
359 // loaded doesn't match the SiteInstance.
360 if (site_.SchemeIs(content::kChromeUIScheme))
361 return;
362
357 ChildProcessSecurityPolicyImpl* policy = 363 ChildProcessSecurityPolicyImpl* policy =
358 ChildProcessSecurityPolicyImpl::GetInstance(); 364 ChildProcessSecurityPolicyImpl::GetInstance();
359 policy->LockToOrigin(process_->GetID(), site_); 365 policy->LockToOrigin(process_->GetID(), site_);
360 } 366 }
361 } 367 }
362 368
363 } // namespace content 369 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/public/browser/child_process_security_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698