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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 12252058: Add a |scope| argument to TRACE_EVENT_INSTANT* and require its presence. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use flags to record scope Created 7 years, 10 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 | Annotate | Revision Log
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/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/hi_res_timer_manager.h" 10 #include "base/hi_res_timer_manager.h"
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 ui::Clipboard::SetAllowedThreads(allowed_clipboard_threads); 735 ui::Clipboard::SetAllowedThreads(allowed_clipboard_threads);
736 736
737 // When running the GPU thread in-process, avoid optimistically starting it 737 // When running the GPU thread in-process, avoid optimistically starting it
738 // since creating the GPU thread races against creation of the one-and-only 738 // since creating the GPU thread races against creation of the one-and-only
739 // ChildProcess instance which is created by the renderer thread. 739 // ChildProcess instance which is created by the renderer thread.
740 if (GpuDataManagerImpl::GetInstance()->GpuAccessAllowed() && 740 if (GpuDataManagerImpl::GetInstance()->GpuAccessAllowed() &&
741 IsForceCompositingModeEnabled() && 741 IsForceCompositingModeEnabled() &&
742 !parsed_command_line_.HasSwitch(switches::kDisableGpuProcessPrelaunch) && 742 !parsed_command_line_.HasSwitch(switches::kDisableGpuProcessPrelaunch) &&
743 !parsed_command_line_.HasSwitch(switches::kSingleProcess) && 743 !parsed_command_line_.HasSwitch(switches::kSingleProcess) &&
744 !parsed_command_line_.HasSwitch(switches::kInProcessGPU)) { 744 !parsed_command_line_.HasSwitch(switches::kInProcessGPU)) {
745 TRACE_EVENT_INSTANT0("gpu", "Post task to launch GPU process"); 745 TRACE_EVENT_INSTANT0("gpu", "Post task to launch GPU process",
746 TRACE_EVENT_SCOPE_THREAD);
746 BrowserThread::PostTask( 747 BrowserThread::PostTask(
747 BrowserThread::IO, FROM_HERE, base::Bind( 748 BrowserThread::IO, FROM_HERE, base::Bind(
748 base::IgnoreResult(&GpuProcessHost::Get), 749 base::IgnoreResult(&GpuProcessHost::Get),
749 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, 750 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
750 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP)); 751 CAUSE_FOR_GPU_LAUNCH_BROWSER_STARTUP));
751 } 752 }
752 #endif // !defined(OS_IOS) 753 #endif // !defined(OS_IOS)
753 } 754 }
754 755
755 void BrowserMainLoop::InitializeToolkit() { 756 void BrowserMainLoop::InitializeToolkit() {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); 806 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
806 if (parameters_.ui_task) 807 if (parameters_.ui_task)
807 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); 808 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task);
808 809
809 base::RunLoop run_loop; 810 base::RunLoop run_loop;
810 run_loop.Run(); 811 run_loop.Run();
811 #endif 812 #endif
812 } 813 }
813 814
814 } // namespace content 815 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698