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

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

Issue 999033003: Remove uses of KillProcess() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/debug/alias.h" 12 #include "base/debug/alias.h"
13 #include "base/debug/asan_invalid_access.h" 13 #include "base/debug/asan_invalid_access.h"
14 #include "base/debug/dump_without_crashing.h" 14 #include "base/debug/dump_without_crashing.h"
15 #include "base/i18n/char_iterator.h" 15 #include "base/i18n/char_iterator.h"
16 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
17 #include "base/process/kill.h"
18 #include "base/process/process.h" 17 #include "base/process/process.h"
19 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
20 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
21 #include "base/time/time.h" 20 #include "base/time/time.h"
22 #include "cc/base/switches.h" 21 #include "cc/base/switches.h"
23 #include "content/child/appcache/appcache_dispatcher.h" 22 #include "content/child/appcache/appcache_dispatcher.h"
24 #include "content/child/plugin_messages.h" 23 #include "content/child/plugin_messages.h"
25 #include "content/child/quota_dispatcher.h" 24 #include "content/child/quota_dispatcher.h"
26 #include "content/child/request_extra_data.h" 25 #include "content/child/request_extra_data.h"
27 #include "content/child/service_worker/service_worker_handle_reference.h" 26 #include "content/child/service_worker/service_worker_handle_reference.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 return; 330 return;
332 if (url == GURL(kChromeUICrashURL)) { 331 if (url == GURL(kChromeUICrashURL)) {
333 CrashIntentionally(); 332 CrashIntentionally();
334 } else if (url == GURL(kChromeUIDumpURL)) { 333 } else if (url == GURL(kChromeUIDumpURL)) {
335 // This URL will only correctly create a crash dump file if content is 334 // This URL will only correctly create a crash dump file if content is
336 // hosted in a process that has correctly called 335 // hosted in a process that has correctly called
337 // base::debug::SetDumpWithoutCrashingFunction. Refer to the documentation 336 // base::debug::SetDumpWithoutCrashingFunction. Refer to the documentation
338 // of base::debug::DumpWithoutCrashing for more details. 337 // of base::debug::DumpWithoutCrashing for more details.
339 base::debug::DumpWithoutCrashing(); 338 base::debug::DumpWithoutCrashing();
340 } else if (url == GURL(kChromeUIKillURL)) { 339 } else if (url == GURL(kChromeUIKillURL)) {
341 base::KillProcess(base::GetCurrentProcessHandle(), 1, false); 340 base::Process::Current().Terminate(1, false);
342 } else if (url == GURL(kChromeUIHangURL)) { 341 } else if (url == GURL(kChromeUIHangURL)) {
343 for (;;) { 342 for (;;) {
344 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1)); 343 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1));
345 } 344 }
346 } else if (url == GURL(kChromeUIShorthangURL)) { 345 } else if (url == GURL(kChromeUIShorthangURL)) {
347 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); 346 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20));
348 } 347 }
349 348
350 #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN) 349 #if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
351 MaybeTriggerAsanError(url); 350 MaybeTriggerAsanError(url);
(...skipping 4158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4510 4509
4511 #if defined(ENABLE_BROWSER_CDMS) 4510 #if defined(ENABLE_BROWSER_CDMS)
4512 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 4511 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
4513 if (!cdm_manager_) 4512 if (!cdm_manager_)
4514 cdm_manager_ = new RendererCdmManager(this); 4513 cdm_manager_ = new RendererCdmManager(this);
4515 return cdm_manager_; 4514 return cdm_manager_;
4516 } 4515 }
4517 #endif // defined(ENABLE_BROWSER_CDMS) 4516 #endif // defined(ENABLE_BROWSER_CDMS)
4518 4517
4519 } // namespace content 4518 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698