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

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

Issue 11312016: content: Move two more url constants into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
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/renderer_host/render_process_host_impl.h" 10 #include "content/browser/renderer_host/render_process_host_impl.h"
(...skipping 14 matching lines...) Expand all
25 return false; 25 return false;
26 26
27 // We treat javascript: as the same site as any URL since it is actually 27 // We treat javascript: as the same site as any URL since it is actually
28 // a modifier on existing pages. 28 // a modifier on existing pages.
29 if (url.SchemeIs(chrome::kJavaScriptScheme)) 29 if (url.SchemeIs(chrome::kJavaScriptScheme))
30 return true; 30 return true;
31 31
32 return url == GURL(chrome::kChromeUICrashURL) || 32 return url == GURL(chrome::kChromeUICrashURL) ||
33 url == GURL(chrome::kChromeUIKillURL) || 33 url == GURL(chrome::kChromeUIKillURL) ||
34 url == GURL(chrome::kChromeUIHangURL) || 34 url == GURL(chrome::kChromeUIHangURL) ||
35 url == GURL(chrome::kChromeUIShorthangURL); 35 url == GURL(kChromeUIShorthangURL);
36 } 36 }
37 37
38 int32 SiteInstanceImpl::next_site_instance_id_ = 1; 38 int32 SiteInstanceImpl::next_site_instance_id_ = 1;
39 39
40 SiteInstanceImpl::SiteInstanceImpl(BrowsingInstance* browsing_instance) 40 SiteInstanceImpl::SiteInstanceImpl(BrowsingInstance* browsing_instance)
41 : id_(next_site_instance_id_++), 41 : id_(next_site_instance_id_++),
42 browsing_instance_(browsing_instance), 42 browsing_instance_(browsing_instance),
43 render_process_host_factory_(NULL), 43 render_process_host_factory_(NULL),
44 process_(NULL), 44 process_(NULL),
45 has_site_(false) { 45 has_site_(false) {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 void SiteInstanceImpl::LockToOrigin() { 320 void SiteInstanceImpl::LockToOrigin() {
321 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 321 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
322 if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation)) { 322 if (command_line.HasSwitch(switches::kEnableStrictSiteIsolation)) {
323 ChildProcessSecurityPolicyImpl* policy = 323 ChildProcessSecurityPolicyImpl* policy =
324 ChildProcessSecurityPolicyImpl::GetInstance(); 324 ChildProcessSecurityPolicyImpl::GetInstance();
325 policy->LockToOrigin(process_->GetID(), site_); 325 policy->LockToOrigin(process_->GetID(), site_);
326 } 326 }
327 } 327 }
328 328
329 } // namespace content 329 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/net/view_http_cache_job_factory.cc ('k') | content/public/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698