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_( | 633 sampling_profiler_(base::PlatformThread::CurrentId(), |
634 base::PlatformThread::CurrentId(), | 634 StackSamplingConfiguration::Get() |
635 StackSamplingConfiguration::Get()-> | 635 ->GetSamplingParamsForCurrentProcess(), |
636 GetSamplingParamsForCurrentProcess(), | 636 StackSamplingConfiguration::Get() |
637 metrics::CallStackProfileMetricsProvider::GetProfilerCallback( | 637 ->GetProfilerCallbackForCurrentProcess()), |
638 metrics::CallStackProfileParams( | |
639 metrics::CallStackProfileParams::BROWSER_PROCESS, | |
640 metrics::CallStackProfileParams::UI_THREAD, | |
641 metrics::CallStackProfileParams::PROCESS_STARTUP, | |
642 metrics::CallStackProfileParams::MAY_SHUFFLE))), | |
643 profile_(NULL), | 638 profile_(NULL), |
644 run_message_loop_(true), | 639 run_message_loop_(true), |
645 local_state_(NULL) { | 640 local_state_(NULL) { |
646 if (StackSamplingConfiguration::Get()->IsProfilerEnabledForCurrentProcess()) | 641 if (StackSamplingConfiguration::Get()->IsProfilerEnabledForCurrentProcess()) |
647 sampling_profiler_.Start(); | 642 sampling_profiler_.Start(); |
648 | 643 |
649 // If we're running tests (ui_task is non-null). | 644 // If we're running tests (ui_task is non-null). |
650 if (parameters.ui_task) | 645 if (parameters.ui_task) |
651 browser_defaults::enable_help_app = false; | 646 browser_defaults::enable_help_app = false; |
652 | 647 |
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2054 chromeos::CrosSettings::Shutdown(); | 2049 chromeos::CrosSettings::Shutdown(); |
2055 #endif // defined(OS_CHROMEOS) | 2050 #endif // defined(OS_CHROMEOS) |
2056 #endif // defined(OS_ANDROID) | 2051 #endif // defined(OS_ANDROID) |
2057 } | 2052 } |
2058 | 2053 |
2059 // Public members: | 2054 // Public members: |
2060 | 2055 |
2061 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2056 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2062 chrome_extra_parts_.push_back(parts); | 2057 chrome_extra_parts_.push_back(parts); |
2063 } | 2058 } |
OLD | NEW |