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

Side by Side Diff: content/renderer/render_process_impl.cc

Issue 1181493002: [Patch 3 of 6] Split out content/child's SiteIsolationPolicy into two new classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_policy_to_sniffer2
Patch Set: Add crbug. 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/renderer/render_process_impl.h" 5 #include "content/renderer/render_process_impl.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 const base::CommandLine& command_line = 52 const base::CommandLine& command_line =
53 *base::CommandLine::ForCurrentProcess(); 53 *base::CommandLine::ForCurrentProcess();
54 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { 54 if (command_line.HasSwitch(switches::kJavaScriptFlags)) {
55 std::string flags( 55 std::string flags(
56 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); 56 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags));
57 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); 57 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size()));
58 } 58 }
59 59
60 // Turn on cross-site document blocking for renderer processes. 60 SiteIsolationStatsGatherer::SetEnabled(
61 SiteIsolationPolicy::SetPolicyEnabled( 61 GetContentClient()->renderer()->ShouldGatherSiteIsolationStats());
62 GetContentClient()->renderer()->ShouldEnableSiteIsolationPolicy());
63 } 62 }
64 63
65 RenderProcessImpl::~RenderProcessImpl() { 64 RenderProcessImpl::~RenderProcessImpl() {
66 #ifndef NDEBUG 65 #ifndef NDEBUG
67 int count = blink::WebFrame::instanceCount(); 66 int count = blink::WebFrame::instanceCount();
68 if (count) 67 if (count)
69 DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES"; 68 DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES";
70 #endif 69 #endif
71 70
72 GetShutDownEvent()->Signal(); 71 GetShutDownEvent()->Signal();
73 } 72 }
74 73
75 void RenderProcessImpl::AddBindings(int bindings) { 74 void RenderProcessImpl::AddBindings(int bindings) {
76 enabled_bindings_ |= bindings; 75 enabled_bindings_ |= bindings;
77 } 76 }
78 77
79 int RenderProcessImpl::GetEnabledBindings() const { 78 int RenderProcessImpl::GetEnabledBindings() const {
80 return enabled_bindings_; 79 return enabled_bindings_;
81 } 80 }
82 81
83 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/content_renderer_client.cc ('k') | extensions/shell/renderer/shell_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698