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 999883002: Profiler-instrumentation of the startup time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 9 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 561
562 #if !defined(OS_WIN) 562 #if !defined(OS_WIN)
563 argc = params.argc; 563 argc = params.argc;
564 argv = params.argv; 564 argv = params.argv;
565 #endif 565 #endif
566 566
567 base::CommandLine::Init(argc, argv); 567 base::CommandLine::Init(argc, argv);
568 568
569 base::EnableTerminationOnHeapCorruption(); 569 base::EnableTerminationOnHeapCorruption();
570 570
571 // Enable profiler recording right after command line is initialized.
572 delegate_->EnableProfilerRecording();
vadimt 2015/03/12 18:23:03 Please move this call to BrowserMainRunnerImpl::In
yao 2015/03/12 18:32:19 This place runs earlier than that. we may want to
vadimt 2015/03/12 18:37:26 Unlikely. But we'll benefit from not spreading thi
yao 2015/03/13 14:28:31 I see. But this function takes in ContentMainPar
vadimt 2015/03/13 14:32:58 Then it's OK to leave it here. Please mark ALL add
yao 2015/03/13 15:24:49 Done.
573
571 #if !defined(OS_IOS) 574 #if !defined(OS_IOS)
572 SetProcessTitleFromCommandLine(argv); 575 SetProcessTitleFromCommandLine(argv);
573 #endif 576 #endif
574 #endif // !OS_ANDROID 577 #endif // !OS_ANDROID
575 578
576 int exit_code = 0; 579 int exit_code = 0;
577 if (delegate_ && delegate_->BasicStartupComplete(&exit_code)) 580 if (delegate_ && delegate_->BasicStartupComplete(&exit_code))
578 return exit_code; 581 return exit_code;
579 582
580 completed_basic_startup_ = true; 583 completed_basic_startup_ = true;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 829
827 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 830 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
828 }; 831 };
829 832
830 // static 833 // static
831 ContentMainRunner* ContentMainRunner::Create() { 834 ContentMainRunner* ContentMainRunner::Create() {
832 return new ContentMainRunnerImpl(); 835 return new ContentMainRunnerImpl();
833 } 836 }
834 837
835 } // namespace content 838 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698