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 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
13 #include "base/profiler/stack_sampling_profiler.h" | 13 #include "base/profiler/stack_sampling_profiler.h" |
14 #include "base/tracked_objects.h" | 14 #include "base/tracked_objects.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/browser/chrome_browser_field_trials.h" | 16 #include "chrome/browser/chrome_browser_field_trials.h" |
17 #include "chrome/browser/chrome_process_singleton.h" | 17 #include "chrome/browser/chrome_process_singleton.h" |
18 #include "chrome/browser/first_run/first_run.h" | 18 #include "chrome/browser/first_run/first_run.h" |
19 #include "chrome/browser/process_singleton.h" | 19 #include "chrome/browser/process_singleton.h" |
20 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 20 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
21 #include "chrome/common/stack_sampling_configuration.h" | 21 #include "chrome/common/stack_sampling_configuration.h" |
| 22 #include "components/metrics/call_stack_profile_params.h" |
22 #include "content/public/browser/browser_main_parts.h" | 23 #include "content/public/browser/browser_main_parts.h" |
23 #include "content/public/common/main_function_params.h" | 24 #include "content/public/common/main_function_params.h" |
24 | 25 |
25 class BrowserProcessImpl; | 26 class BrowserProcessImpl; |
26 class ChromeBrowserMainExtraParts; | 27 class ChromeBrowserMainExtraParts; |
27 class FieldTrialSynchronizer; | 28 class FieldTrialSynchronizer; |
28 class PrefService; | 29 class PrefService; |
29 class Profile; | 30 class Profile; |
30 class StartupBrowserCreator; | 31 class StartupBrowserCreator; |
31 class StartupTimeBomb; | 32 class StartupTimeBomb; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 ChromeBrowserFieldTrials browser_field_trials_; | 147 ChromeBrowserFieldTrials browser_field_trials_; |
147 | 148 |
148 #if !defined(OS_ANDROID) | 149 #if !defined(OS_ANDROID) |
149 std::unique_ptr<WebUsbDetector> web_usb_detector_; | 150 std::unique_ptr<WebUsbDetector> web_usb_detector_; |
150 #endif | 151 #endif |
151 | 152 |
152 // Vector of additional ChromeBrowserMainExtraParts. | 153 // Vector of additional ChromeBrowserMainExtraParts. |
153 // Parts are deleted in the inverse order they are added. | 154 // Parts are deleted in the inverse order they are added. |
154 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; | 155 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; |
155 | 156 |
| 157 // Parameters for |sampling_profiler_|. Not const since these may be changed |
| 158 // when transitioning from start-up profiling to periodic profiling. |
| 159 metrics::CallStackProfileParams sampling_profiler_params_; |
| 160 |
156 // A profiler that periodically samples stack traces. Used to sample startup | 161 // A profiler that periodically samples stack traces. Used to sample startup |
157 // behavior. | 162 // behavior. |
158 base::StackSamplingProfiler sampling_profiler_; | 163 base::StackSamplingProfiler sampling_profiler_; |
159 | 164 |
160 // Members initialized after / released before main_message_loop_ ------------ | 165 // Members initialized after / released before main_message_loop_ ------------ |
161 | 166 |
162 std::unique_ptr<BrowserProcessImpl> browser_process_; | 167 std::unique_ptr<BrowserProcessImpl> browser_process_; |
163 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; | 168 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; |
164 | 169 |
165 #if !defined(OS_ANDROID) | 170 #if !defined(OS_ANDROID) |
(...skipping 23 matching lines...) Expand all Loading... |
189 | 194 |
190 // Members initialized in PreMainMessageLoopRun, needed in | 195 // Members initialized in PreMainMessageLoopRun, needed in |
191 // PreMainMessageLoopRunThreadsCreated. | 196 // PreMainMessageLoopRunThreadsCreated. |
192 PrefService* local_state_; | 197 PrefService* local_state_; |
193 base::FilePath user_data_dir_; | 198 base::FilePath user_data_dir_; |
194 | 199 |
195 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 200 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
196 }; | 201 }; |
197 | 202 |
198 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 203 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |