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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 23687007: Remove redundant exit-detection code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/renderer_main_platform_delegate_win.cc » ('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/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/crash_logging.h" 10 #include "base/debug/crash_logging.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 109
110 PpapiThread::~PpapiThread() { 110 PpapiThread::~PpapiThread() {
111 } 111 }
112 112
113 void PpapiThread::Shutdown() { 113 void PpapiThread::Shutdown() {
114 ppapi::proxy::PluginGlobals::Get()->set_plugin_proxy_delegate(NULL); 114 ppapi::proxy::PluginGlobals::Get()->set_plugin_proxy_delegate(NULL);
115 if (plugin_entry_points_.shutdown_module) 115 if (plugin_entry_points_.shutdown_module)
116 plugin_entry_points_.shutdown_module(); 116 plugin_entry_points_.shutdown_module();
117 WebKit::shutdown(); 117 WebKit::shutdown();
118
119 #if defined(OS_WIN)
120 if (permissions_.HasPermission(ppapi::PERMISSION_FLASH))
121 base::win::SetShouldCrashOnProcessDetach(false);
122 #endif
123 } 118 }
124 119
125 bool PpapiThread::Send(IPC::Message* msg) { 120 bool PpapiThread::Send(IPC::Message* msg) {
126 // Allow access from multiple threads. 121 // Allow access from multiple threads.
127 if (base::MessageLoop::current() == message_loop()) 122 if (base::MessageLoop::current() == message_loop())
128 return ChildThread::Send(msg); 123 return ChildThread::Send(msg);
129 124
130 return sync_message_filter()->Send(msg); 125 return sync_message_filter()->Send(msg);
131 } 126 }
132 127
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 ReportLoadResult(path, ENTRY_POINT_MISSING); 296 ReportLoadResult(path, ENTRY_POINT_MISSING);
302 return; 297 return;
303 } 298 }
304 } 299 }
305 } 300 }
306 301
307 #if defined(OS_WIN) 302 #if defined(OS_WIN)
308 // If code subsequently tries to exit using abort(), force a crash (since 303 // If code subsequently tries to exit using abort(), force a crash (since
309 // otherwise these would be silent terminations and fly under the radar). 304 // otherwise these would be silent terminations and fly under the radar).
310 base::win::SetAbortBehaviorForCrashReporting(); 305 base::win::SetAbortBehaviorForCrashReporting();
311 if (permissions.HasPermission(ppapi::PERMISSION_FLASH)) {
312 // Force a crash for exit(), _exit(), or ExitProcess(), but only do that for
313 // Pepper Flash.
314 base::win::SetShouldCrashOnProcessDetach(true);
315 }
316 306
317 // Once we lower the token the sandbox is locked down and no new modules 307 // Once we lower the token the sandbox is locked down and no new modules
318 // can be loaded. TODO(cpu): consider changing to the loading style of 308 // can be loaded. TODO(cpu): consider changing to the loading style of
319 // regular plugins. 309 // regular plugins.
320 if (g_target_services) { 310 if (g_target_services) {
321 // Let Flash load DRM before lockdown on Vista+. 311 // Let Flash load DRM before lockdown on Vista+.
322 if (permissions.HasPermission(ppapi::PERMISSION_FLASH) && 312 if (permissions.HasPermission(ppapi::PERMISSION_FLASH) &&
323 base::win::OSInfo::GetInstance()->version() >= 313 base::win::OSInfo::GetInstance()->version() >=
324 base::win::VERSION_VISTA ) { 314 base::win::VERSION_VISTA ) {
325 LoadLibrary(L"dxva2.dll"); 315 LoadLibrary(L"dxva2.dll");
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 histogram_name.str(), 497 histogram_name.str(),
508 1, 498 1,
509 LOAD_RESULT_MAX, 499 LOAD_RESULT_MAX,
510 LOAD_RESULT_MAX + 1, 500 LOAD_RESULT_MAX + 1,
511 base::HistogramBase::kUmaTargetedHistogramFlag); 501 base::HistogramBase::kUmaTargetedHistogramFlag);
512 502
513 histogram->Add(result); 503 histogram->Add(result);
514 } 504 }
515 505
516 } // namespace content 506 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/renderer_main_platform_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698