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

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

Issue 425593002: Refactor trace_event_impl's SetEnabled to use TraceOptions. Propagate this through the whole stack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/allocator/allocator_extension.h" 9 #include "base/allocator/allocator_extension.h"
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 #endif 625 #endif
626 626
627 // Enable startup tracing asap to avoid early TRACE_EVENT calls being 627 // Enable startup tracing asap to avoid early TRACE_EVENT calls being
628 // ignored. 628 // ignored.
629 if (command_line.HasSwitch(switches::kTraceStartup)) { 629 if (command_line.HasSwitch(switches::kTraceStartup)) {
630 base::debug::CategoryFilter category_filter( 630 base::debug::CategoryFilter category_filter(
631 command_line.GetSwitchValueASCII(switches::kTraceStartup)); 631 command_line.GetSwitchValueASCII(switches::kTraceStartup));
632 base::debug::TraceLog::GetInstance()->SetEnabled( 632 base::debug::TraceLog::GetInstance()->SetEnabled(
633 category_filter, 633 category_filter,
634 base::debug::TraceLog::RECORDING_MODE, 634 base::debug::TraceLog::RECORDING_MODE,
635 base::debug::TraceLog::RECORD_UNTIL_FULL); 635 base::debug::TraceOptions("record-until-full"));
dsinclair 2014/07/28 18:52:36 This should be using the constant.
nednguyen 2014/07/28 20:27:22 Done.
636 } 636 }
637 #if !defined(OS_ANDROID) 637 #if !defined(OS_ANDROID)
638 // Android tracing started at the beginning of the method. 638 // Android tracing started at the beginning of the method.
639 // Other OSes have to wait till we get here in order for all the memory 639 // Other OSes have to wait till we get here in order for all the memory
640 // management setup to be completed. 640 // management setup to be completed.
641 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize"); 641 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize");
642 #endif // !OS_ANDROID 642 #endif // !OS_ANDROID
643 643
644 #if defined(OS_MACOSX) && !defined(OS_IOS) 644 #if defined(OS_MACOSX) && !defined(OS_IOS)
645 // We need to allocate the IO Ports before the Sandbox is initialized or 645 // We need to allocate the IO Ports before the Sandbox is initialized or
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 818
819 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 819 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
820 }; 820 };
821 821
822 // static 822 // static
823 ContentMainRunner* ContentMainRunner::Create() { 823 ContentMainRunner* ContentMainRunner::Create() {
824 return new ContentMainRunnerImpl(); 824 return new ContentMainRunnerImpl();
825 } 825 }
826 826
827 } // namespace content 827 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698