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