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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| 11 #include "base/profiler/cpu_profiler.h" |
11 #include "base/tracked_objects.h" | 12 #include "base/tracked_objects.h" |
12 #include "chrome/browser/chrome_browser_field_trials.h" | 13 #include "chrome/browser/chrome_browser_field_trials.h" |
13 #include "chrome/browser/chrome_process_singleton.h" | 14 #include "chrome/browser/chrome_process_singleton.h" |
14 #include "chrome/browser/first_run/first_run.h" | 15 #include "chrome/browser/first_run/first_run.h" |
15 #include "chrome/browser/process_singleton.h" | 16 #include "chrome/browser/process_singleton.h" |
16 #include "chrome/browser/task_profiler/auto_tracking.h" | 17 #include "chrome/browser/task_profiler/auto_tracking.h" |
17 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 18 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
18 #include "content/public/browser/browser_main_parts.h" | 19 #include "content/public/browser/browser_main_parts.h" |
19 #include "content/public/common/main_function_params.h" | 20 #include "content/public/common/main_function_params.h" |
20 | 21 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 145 |
145 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 146 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
146 // A monitor for attributing power consumption to origins. | 147 // A monitor for attributing power consumption to origins. |
147 scoped_ptr<ProcessPowerCollector> process_power_collector_; | 148 scoped_ptr<ProcessPowerCollector> process_power_collector_; |
148 #endif | 149 #endif |
149 | 150 |
150 // Vector of additional ChromeBrowserMainExtraParts. | 151 // Vector of additional ChromeBrowserMainExtraParts. |
151 // Parts are deleted in the inverse order they are added. | 152 // Parts are deleted in the inverse order they are added. |
152 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; | 153 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; |
153 | 154 |
| 155 // A profiler that periodically samples stack traces. |
| 156 base::CpuProfiler cpu_profiler_; |
| 157 |
154 // Members initialized after / released before main_message_loop_ ------------ | 158 // Members initialized after / released before main_message_loop_ ------------ |
155 | 159 |
156 scoped_ptr<BrowserProcessImpl> browser_process_; | 160 scoped_ptr<BrowserProcessImpl> browser_process_; |
157 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; | 161 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; |
158 #if !defined(OS_ANDROID) | 162 #if !defined(OS_ANDROID) |
159 // Browser creation happens on the Java side in Android. | 163 // Browser creation happens on the Java side in Android. |
160 scoped_ptr<StartupBrowserCreator> browser_creator_; | 164 scoped_ptr<StartupBrowserCreator> browser_creator_; |
161 | 165 |
162 // Android doesn't support multiple browser processes, so it doesn't implement | 166 // Android doesn't support multiple browser processes, so it doesn't implement |
163 // ProcessSingleton. | 167 // ProcessSingleton. |
(...skipping 19 matching lines...) Expand all Loading... |
183 bool restart_last_session_; | 187 bool restart_last_session_; |
184 | 188 |
185 // Tests can set this to true to disable restricting cookie access in the | 189 // Tests can set this to true to disable restricting cookie access in the |
186 // network stack, as this can only be done once. | 190 // network stack, as this can only be done once. |
187 static bool disable_enforcing_cookie_policies_for_tests_; | 191 static bool disable_enforcing_cookie_policies_for_tests_; |
188 | 192 |
189 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 193 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
190 }; | 194 }; |
191 | 195 |
192 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 196 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |