| 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" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 40 extern const char kMissingLocaleDataMessage[]; | 40 extern const char kMissingLocaleDataMessage[]; |
| 41 #endif | 41 #endif |
| 42 } | 42 } |
| 43 | 43 |
| 44 namespace chrome_browser_metrics { | 44 namespace chrome_browser_metrics { |
| 45 class TrackingSynchronizer; | 45 class TrackingSynchronizer; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace performance_monitor { | |
| 49 class StartupTimer; | |
| 50 } | |
| 51 | |
| 52 class ChromeBrowserMainParts : public content::BrowserMainParts { | 48 class ChromeBrowserMainParts : public content::BrowserMainParts { |
| 53 public: | 49 public: |
| 54 virtual ~ChromeBrowserMainParts(); | 50 virtual ~ChromeBrowserMainParts(); |
| 55 | 51 |
| 56 // Add additional ChromeBrowserMainExtraParts. | 52 // Add additional ChromeBrowserMainExtraParts. |
| 57 virtual void AddParts(ChromeBrowserMainExtraParts* parts); | 53 virtual void AddParts(ChromeBrowserMainExtraParts* parts); |
| 58 | 54 |
| 59 protected: | 55 protected: |
| 60 explicit ChromeBrowserMainParts( | 56 explicit ChromeBrowserMainParts( |
| 61 const content::MainFunctionParams& parameters); | 57 const content::MainFunctionParams& parameters); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 int result_code_; | 124 int result_code_; |
| 129 | 125 |
| 130 // Create StartupTimeBomb object for watching jank during startup. | 126 // Create StartupTimeBomb object for watching jank during startup. |
| 131 scoped_ptr<StartupTimeBomb> startup_watcher_; | 127 scoped_ptr<StartupTimeBomb> startup_watcher_; |
| 132 | 128 |
| 133 // Create ShutdownWatcherHelper object for watching jank during shutdown. | 129 // Create ShutdownWatcherHelper object for watching jank during shutdown. |
| 134 // Please keep |shutdown_watcher| as the first object constructed, and hence | 130 // Please keep |shutdown_watcher| as the first object constructed, and hence |
| 135 // it is destroyed last. | 131 // it is destroyed last. |
| 136 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; | 132 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; |
| 137 | 133 |
| 138 // A timer to hold data regarding startup and session restore times for | |
| 139 // PerformanceMonitor so that we don't have to start the entire | |
| 140 // PerformanceMonitor at browser startup. | |
| 141 scoped_ptr<performance_monitor::StartupTimer> startup_timer_; | |
| 142 | |
| 143 // Creating this object starts tracking the creation and deletion of Task | 134 // Creating this object starts tracking the creation and deletion of Task |
| 144 // instance. This MUST be done before main_message_loop, so that it is | 135 // instance. This MUST be done before main_message_loop, so that it is |
| 145 // destroyed after the main_message_loop. | 136 // destroyed after the main_message_loop. |
| 146 task_profiler::AutoTracking tracking_objects_; | 137 task_profiler::AutoTracking tracking_objects_; |
| 147 | 138 |
| 148 // Statistical testing infrastructure for the entire browser. NULL until | 139 // Statistical testing infrastructure for the entire browser. NULL until |
| 149 // SetupMetricsAndFieldTrials is called. | 140 // SetupMetricsAndFieldTrials is called. |
| 150 scoped_ptr<base::FieldTrialList> field_trial_list_; | 141 scoped_ptr<base::FieldTrialList> field_trial_list_; |
| 151 | 142 |
| 152 ChromeBrowserFieldTrials browser_field_trials_; | 143 ChromeBrowserFieldTrials browser_field_trials_; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 bool restart_last_session_; | 184 bool restart_last_session_; |
| 194 | 185 |
| 195 // Tests can set this to true to disable restricting cookie access in the | 186 // Tests can set this to true to disable restricting cookie access in the |
| 196 // network stack, as this can only be done once. | 187 // network stack, as this can only be done once. |
| 197 static bool disable_enforcing_cookie_policies_for_tests_; | 188 static bool disable_enforcing_cookie_policies_for_tests_; |
| 198 | 189 |
| 199 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 190 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
| 200 }; | 191 }; |
| 201 | 192 |
| 202 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 193 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| OLD | NEW |