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/tracked_objects.h" | 11 #include "base/tracked_objects.h" |
12 #include "chrome/browser/chrome_browser_field_trials.h" | 12 #include "chrome/browser/chrome_browser_field_trials.h" |
13 #include "chrome/browser/chrome_process_singleton.h" | 13 #include "chrome/browser/chrome_process_singleton.h" |
14 #include "chrome/browser/first_run/first_run.h" | 14 #include "chrome/browser/first_run/first_run.h" |
15 #include "chrome/browser/process_singleton.h" | 15 #include "chrome/browser/process_singleton.h" |
16 #include "chrome/browser/task_profiler/auto_tracking.h" | 16 #include "chrome/browser/task_profiler/auto_tracking.h" |
17 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 17 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
18 #include "content/public/browser/browser_main_parts.h" | 18 #include "content/public/browser/browser_main_parts.h" |
19 #include "content/public/common/main_function_params.h" | 19 #include "content/public/common/main_function_params.h" |
20 | 20 |
21 class BrowserProcessImpl; | 21 class BrowserProcessImpl; |
22 class ChromeBrowserMainExtraParts; | 22 class ChromeBrowserMainExtraParts; |
| 23 class ChromeBrowserMetricsLogObserver; |
23 class FieldTrialSynchronizer; | 24 class FieldTrialSynchronizer; |
24 class MetricsService; | 25 class MetricsService; |
25 class PrefService; | 26 class PrefService; |
26 class Profile; | 27 class Profile; |
27 class StartupBrowserCreator; | 28 class StartupBrowserCreator; |
28 class StartupTimeBomb; | 29 class StartupTimeBomb; |
29 class ShutdownWatcherHelper; | 30 class ShutdownWatcherHelper; |
30 class ThreeDAPIObserver; | 31 class ThreeDAPIObserver; |
31 | 32 |
32 namespace chrome_browser { | 33 namespace chrome_browser { |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 145 |
145 // Creating this object starts tracking the creation and deletion of Task | 146 // Creating this object starts tracking the creation and deletion of Task |
146 // instance. This MUST be done before main_message_loop, so that it is | 147 // instance. This MUST be done before main_message_loop, so that it is |
147 // destroyed after the main_message_loop. | 148 // destroyed after the main_message_loop. |
148 task_profiler::AutoTracking tracking_objects_; | 149 task_profiler::AutoTracking tracking_objects_; |
149 | 150 |
150 // Statistical testing infrastructure for the entire browser. NULL until | 151 // Statistical testing infrastructure for the entire browser. NULL until |
151 // SetupMetricsAndFieldTrials is called. | 152 // SetupMetricsAndFieldTrials is called. |
152 scoped_ptr<base::FieldTrialList> field_trial_list_; | 153 scoped_ptr<base::FieldTrialList> field_trial_list_; |
153 | 154 |
| 155 // Observe and log histograms on new metric logs. |
| 156 scoped_ptr<ChromeBrowserMetricsLogObserver> browser_metrics_log_observer_; |
| 157 |
154 ChromeBrowserFieldTrials browser_field_trials_; | 158 ChromeBrowserFieldTrials browser_field_trials_; |
155 | 159 |
156 // Vector of additional ChromeBrowserMainExtraParts. | 160 // Vector of additional ChromeBrowserMainExtraParts. |
157 // Parts are deleted in the inverse order they are added. | 161 // Parts are deleted in the inverse order they are added. |
158 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; | 162 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; |
159 | 163 |
160 // Members initialized after / released before main_message_loop_ ------------ | 164 // Members initialized after / released before main_message_loop_ ------------ |
161 | 165 |
162 scoped_ptr<BrowserProcessImpl> browser_process_; | 166 scoped_ptr<BrowserProcessImpl> browser_process_; |
163 scoped_refptr<chrome_browser_metrics::TrackingSynchronizer> | 167 scoped_refptr<chrome_browser_metrics::TrackingSynchronizer> |
(...skipping 26 matching lines...) Expand all Loading... |
190 bool restart_last_session_; | 194 bool restart_last_session_; |
191 | 195 |
192 // Tests can set this to true to disable restricting cookie access in the | 196 // Tests can set this to true to disable restricting cookie access in the |
193 // network stack, as this can only be done once. | 197 // network stack, as this can only be done once. |
194 static bool disable_enforcing_cookie_policies_for_tests_; | 198 static bool disable_enforcing_cookie_policies_for_tests_; |
195 | 199 |
196 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 200 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
197 }; | 201 }; |
198 | 202 |
199 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 203 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |