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/renderer/renderer_main.cc

Issue 845223002: Removing --renderer-assert-test command-line flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build errors Created 5 years, 11 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | 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 "base/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 namespace { 57 namespace {
58 // This function provides some ways to test crash and assertion handling 58 // This function provides some ways to test crash and assertion handling
59 // behavior of the renderer. 59 // behavior of the renderer.
60 static void HandleRendererErrorTestParameters( 60 static void HandleRendererErrorTestParameters(
61 const base::CommandLine& command_line) { 61 const base::CommandLine& command_line) {
62 if (command_line.HasSwitch(switches::kWaitForDebugger)) 62 if (command_line.HasSwitch(switches::kWaitForDebugger))
63 base::debug::WaitForDebugger(60, true); 63 base::debug::WaitForDebugger(60, true);
64 64
65 if (command_line.HasSwitch(switches::kRendererStartupDialog)) 65 if (command_line.HasSwitch(switches::kRendererStartupDialog))
66 ChildProcess::WaitForDebugger("Renderer"); 66 ChildProcess::WaitForDebugger("Renderer");
67
68 // This parameter causes an assertion.
69 if (command_line.HasSwitch(switches::kRendererAssertTest)) {
70 DCHECK(false);
71 }
72 } 67 }
73 68
74 // This is a simplified version of the browser Jankometer, which measures 69 // This is a simplified version of the browser Jankometer, which measures
75 // the processing time of tasks on the render thread. 70 // the processing time of tasks on the render thread.
76 class RendererMessageLoopObserver : public base::MessageLoop::TaskObserver { 71 class RendererMessageLoopObserver : public base::MessageLoop::TaskObserver {
77 public: 72 public:
78 RendererMessageLoopObserver() 73 RendererMessageLoopObserver()
79 : process_times_(base::Histogram::FactoryGet( 74 : process_times_(base::Histogram::FactoryGet(
80 "Chrome.ProcMsgL RenderThread", 75 "Chrome.ProcMsgL RenderThread",
81 1, 3600000, 50, base::Histogram::kUmaTargetedHistogramFlag)) {} 76 1, 3600000, 50, base::Histogram::kUmaTargetedHistogramFlag)) {}
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 base::MessageLoop::current()->Run(); 230 base::MessageLoop::current()->Run();
236 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); 231 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
237 } 232 }
238 } 233 }
239 platform.PlatformUninitialize(); 234 platform.PlatformUninitialize();
240 TRACE_EVENT_END_ETW("RendererMain", 0, ""); 235 TRACE_EVENT_END_ETW("RendererMain", 0, "");
241 return 0; 236 return 0;
242 } 237 }
243 238
244 } // namespace content 239 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698