OLD | NEW |
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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 #endif | 626 #endif |
627 | 627 |
628 // Enable startup tracing asap to avoid early TRACE_EVENT calls being | 628 // Enable startup tracing asap to avoid early TRACE_EVENT calls being |
629 // ignored. | 629 // ignored. |
630 if (command_line.HasSwitch(switches::kTraceStartup)) { | 630 if (command_line.HasSwitch(switches::kTraceStartup)) { |
631 base::debug::CategoryFilter category_filter( | 631 base::debug::CategoryFilter category_filter( |
632 command_line.GetSwitchValueASCII(switches::kTraceStartup)); | 632 command_line.GetSwitchValueASCII(switches::kTraceStartup)); |
633 base::debug::TraceLog::GetInstance()->SetEnabled( | 633 base::debug::TraceLog::GetInstance()->SetEnabled( |
634 category_filter, | 634 category_filter, |
635 base::debug::TraceLog::RECORDING_MODE, | 635 base::debug::TraceLog::RECORDING_MODE, |
636 base::debug::TraceLog::RECORD_UNTIL_FULL); | 636 base::debug::TraceOptions( |
| 637 base::debug::RECORD_UNTIL_FULL)); |
637 } | 638 } |
638 #if !defined(OS_ANDROID) | 639 #if !defined(OS_ANDROID) |
639 // Android tracing started at the beginning of the method. | 640 // Android tracing started at the beginning of the method. |
640 // Other OSes have to wait till we get here in order for all the memory | 641 // Other OSes have to wait till we get here in order for all the memory |
641 // management setup to be completed. | 642 // management setup to be completed. |
642 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize"); | 643 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize"); |
643 #endif // !OS_ANDROID | 644 #endif // !OS_ANDROID |
644 | 645 |
645 #if defined(OS_MACOSX) && !defined(OS_IOS) | 646 #if defined(OS_MACOSX) && !defined(OS_IOS) |
646 // We need to allocate the IO Ports before the Sandbox is initialized or | 647 // We need to allocate the IO Ports before the Sandbox is initialized or |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 | 819 |
819 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 820 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
820 }; | 821 }; |
821 | 822 |
822 // static | 823 // static |
823 ContentMainRunner* ContentMainRunner::Create() { | 824 ContentMainRunner* ContentMainRunner::Create() { |
824 return new ContentMainRunnerImpl(); | 825 return new ContentMainRunnerImpl(); |
825 } | 826 } |
826 | 827 |
827 } // namespace content | 828 } // namespace content |
OLD | NEW |