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

Side by Side Diff: content/app/content_main_runner.cc

Issue 1923533004: Tracing pre-filtering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« base/trace_event/trace_log.cc ('K') | « base/trace_event/trace_log.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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 SetContentClient(&empty_content_client_); 540 SetContentClient(&empty_content_client_);
541 ContentClientInitializer::Set(process_type, delegate_); 541 ContentClientInitializer::Set(process_type, delegate_);
542 542
543 #if defined(OS_WIN) 543 #if defined(OS_WIN)
544 // Route stdio to parent console (if any) or create one. 544 // Route stdio to parent console (if any) or create one.
545 if (command_line.HasSwitch(switches::kEnableLogging)) 545 if (command_line.HasSwitch(switches::kEnableLogging))
546 base::RouteStdioToConsole(true); 546 base::RouteStdioToConsole(true);
547 #endif 547 #endif
548 548
549 #if !defined(OS_ANDROID) 549 #if !defined(OS_ANDROID)
550 // TEMP
551 base::trace_event::TraceConfig trace_config(
552 "", base::trace_event::RECORD_UNTIL_FULL);
553
554 base::trace_event::TraceLog::GetInstance()->SetEnabled(
555 trace_config, base::trace_event::TraceLog::RECORDING_MODE);
556 // TEMP
557
550 // Enable startup tracing asap to avoid early TRACE_EVENT calls being 558 // Enable startup tracing asap to avoid early TRACE_EVENT calls being
551 // ignored. For Android, startup tracing is enabled in an even earlier place 559 // ignored. For Android, startup tracing is enabled in an even earlier place
552 // content/app/android/library_loader_hooks.cc. 560 // content/app/android/library_loader_hooks.cc.
553 if (command_line.HasSwitch(switches::kTraceStartup)) { 561 if (command_line.HasSwitch(switches::kTraceStartup)) {
554 base::trace_event::TraceConfig trace_config( 562 base::trace_event::TraceConfig trace_config(
555 command_line.GetSwitchValueASCII(switches::kTraceStartup), 563 command_line.GetSwitchValueASCII(switches::kTraceStartup),
556 base::trace_event::RECORD_UNTIL_FULL); 564 base::trace_event::RECORD_UNTIL_FULL);
557 base::trace_event::TraceLog::GetInstance()->SetEnabled( 565 base::trace_event::TraceLog::GetInstance()->SetEnabled(
558 trace_config, 566 trace_config,
559 base::trace_event::TraceLog::RECORDING_MODE); 567 base::trace_event::TraceLog::RECORDING_MODE);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 806
799 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 807 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
800 }; 808 };
801 809
802 // static 810 // static
803 ContentMainRunner* ContentMainRunner::Create() { 811 ContentMainRunner* ContentMainRunner::Create() {
804 return new ContentMainRunnerImpl(); 812 return new ContentMainRunnerImpl();
805 } 813 }
806 814
807 } // namespace content 815 } // namespace content
OLDNEW
« base/trace_event/trace_log.cc ('K') | « base/trace_event/trace_log.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698