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 "chrome/browser/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
623 | 623 |
624 // BrowserMainParts ------------------------------------------------------------ | 624 // BrowserMainParts ------------------------------------------------------------ |
625 | 625 |
626 ChromeBrowserMainParts::ChromeBrowserMainParts( | 626 ChromeBrowserMainParts::ChromeBrowserMainParts( |
627 const content::MainFunctionParams& parameters) | 627 const content::MainFunctionParams& parameters) |
628 : parameters_(parameters), | 628 : parameters_(parameters), |
629 parsed_command_line_(parameters.command_line), | 629 parsed_command_line_(parameters.command_line), |
630 result_code_(content::RESULT_CODE_NORMAL_EXIT), | 630 result_code_(content::RESULT_CODE_NORMAL_EXIT), |
631 startup_watcher_(new StartupTimeBomb()), | 631 startup_watcher_(new StartupTimeBomb()), |
632 shutdown_watcher_(new ShutdownWatcherHelper()), | 632 shutdown_watcher_(new ShutdownWatcherHelper()), |
633 sampling_profiler_params_( | |
634 metrics::CallStackProfileParams::BROWSER_PROCESS, | |
635 metrics::CallStackProfileParams::UI_THREAD, | |
636 metrics::CallStackProfileParams::PROCESS_STARTUP, | |
637 metrics::CallStackProfileParams::MAY_SHUFFLE), | |
633 sampling_profiler_( | 638 sampling_profiler_( |
634 base::PlatformThread::CurrentId(), | 639 base::PlatformThread::CurrentId(), |
635 StackSamplingConfiguration::Get()-> | 640 StackSamplingConfiguration::Get() |
636 GetSamplingParamsForCurrentProcess(), | 641 ->GetSamplingParamsForCurrentProcess(), |
637 metrics::CallStackProfileMetricsProvider::GetProfilerCallback( | 642 metrics::CallStackProfileMetricsProvider::GetProfilerCallback( |
638 metrics::CallStackProfileParams( | 643 &sampling_profiler_params_)), |
sky
2017/07/12 21:42:58
It's rather error prone to have callers be respons
Alexei Svitkine (slow)
2017/07/13 17:58:22
Done.
| |
639 metrics::CallStackProfileParams::BROWSER_PROCESS, | |
640 metrics::CallStackProfileParams::UI_THREAD, | |
641 metrics::CallStackProfileParams::PROCESS_STARTUP, | |
642 metrics::CallStackProfileParams::MAY_SHUFFLE))), | |
643 profile_(NULL), | 644 profile_(NULL), |
644 run_message_loop_(true), | 645 run_message_loop_(true), |
645 local_state_(NULL) { | 646 local_state_(NULL) { |
646 if (StackSamplingConfiguration::Get()->IsProfilerEnabledForCurrentProcess()) | 647 if (StackSamplingConfiguration::Get()->IsProfilerEnabledForCurrentProcess()) |
647 sampling_profiler_.Start(); | 648 sampling_profiler_.Start(); |
648 | 649 |
649 // If we're running tests (ui_task is non-null). | 650 // If we're running tests (ui_task is non-null). |
650 if (parameters.ui_task) | 651 if (parameters.ui_task) |
651 browser_defaults::enable_help_app = false; | 652 browser_defaults::enable_help_app = false; |
652 | 653 |
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2066 chromeos::CrosSettings::Shutdown(); | 2067 chromeos::CrosSettings::Shutdown(); |
2067 #endif // defined(OS_CHROMEOS) | 2068 #endif // defined(OS_CHROMEOS) |
2068 #endif // defined(OS_ANDROID) | 2069 #endif // defined(OS_ANDROID) |
2069 } | 2070 } |
2070 | 2071 |
2071 // Public members: | 2072 // Public members: |
2072 | 2073 |
2073 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2074 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2074 chrome_extra_parts_.push_back(parts); | 2075 chrome_extra_parts_.push_back(parts); |
2075 } | 2076 } |
OLD | NEW |