| 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/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 virtual int PreCreateThreads() OVERRIDE; | 71 virtual int PreCreateThreads() OVERRIDE; |
| 72 virtual void PreMainMessageLoopRun() OVERRIDE; | 72 virtual void PreMainMessageLoopRun() OVERRIDE; |
| 73 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 73 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
| 74 virtual void PostMainMessageLoopRun() OVERRIDE; | 74 virtual void PostMainMessageLoopRun() OVERRIDE; |
| 75 virtual void PostDestroyThreads() OVERRIDE; | 75 virtual void PostDestroyThreads() OVERRIDE; |
| 76 | 76 |
| 77 // Additional stages for ChromeBrowserMainExtraParts. These stages are called | 77 // Additional stages for ChromeBrowserMainExtraParts. These stages are called |
| 78 // in order from PreMainMessageLoopRun(). See implementation for details. | 78 // in order from PreMainMessageLoopRun(). See implementation for details. |
| 79 virtual void PreProfileInit(); | 79 virtual void PreProfileInit(); |
| 80 virtual void PostProfileInit(); | 80 virtual void PostProfileInit(); |
| 81 virtual void PreInteractiveFirstRunInit(); | |
| 82 virtual void PostInteractiveFirstRunInit(); | |
| 83 virtual void PreBrowserStart(); | 81 virtual void PreBrowserStart(); |
| 84 virtual void PostBrowserStart(); | 82 virtual void PostBrowserStart(); |
| 85 | 83 |
| 86 #if !defined(OS_ANDROID) | 84 #if !defined(OS_ANDROID) |
| 87 // Runs the PageCycler; called if the switch kVisitURLs is present. | 85 // Runs the PageCycler; called if the switch kVisitURLs is present. |
| 88 virtual void RunPageCycler(); | 86 virtual void RunPageCycler(); |
| 89 #endif | 87 #endif |
| 90 | 88 |
| 91 // Override this in subclasses to initialize platform specific field trials. | 89 // Override this in subclasses to initialize platform specific field trials. |
| 92 virtual void SetupPlatformFieldTrials(); | 90 virtual void SetupPlatformFieldTrials(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 TranslateManager* translate_manager_; | 176 TranslateManager* translate_manager_; |
| 179 Profile* profile_; | 177 Profile* profile_; |
| 180 bool run_message_loop_; | 178 bool run_message_loop_; |
| 181 ProcessSingleton::NotifyResult notify_result_; | 179 ProcessSingleton::NotifyResult notify_result_; |
| 182 | 180 |
| 183 // Initialized in SetupMetricsAndFieldTrials. | 181 // Initialized in SetupMetricsAndFieldTrials. |
| 184 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; | 182 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; |
| 185 | 183 |
| 186 // Members initialized in PreMainMessageLoopRun, needed in | 184 // Members initialized in PreMainMessageLoopRun, needed in |
| 187 // PreMainMessageLoopRunThreadsCreated. | 185 // PreMainMessageLoopRunThreadsCreated. |
| 188 bool is_first_run_; | 186 bool do_first_run_tasks_; |
| 189 bool first_run_ui_bypass_; | |
| 190 PrefService* local_state_; | 187 PrefService* local_state_; |
| 191 FilePath user_data_dir_; | 188 FilePath user_data_dir_; |
| 192 | 189 |
| 193 // Members needed across shutdown methods. | 190 // Members needed across shutdown methods. |
| 194 bool restart_last_session_; | 191 bool restart_last_session_; |
| 195 | 192 |
| 196 // Tests can set this to true to disable restricting cookie access in the | 193 // Tests can set this to true to disable restricting cookie access in the |
| 197 // network stack, as this can only be done once. | 194 // network stack, as this can only be done once. |
| 198 static bool disable_enforcing_cookie_policies_for_tests_; | 195 static bool disable_enforcing_cookie_policies_for_tests_; |
| 199 | 196 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 218 // Records the time from our process' startup to the present time in | 215 // Records the time from our process' startup to the present time in |
| 219 // the Startup.BrowserMessageLoopStartTime UMA histogram. | 216 // the Startup.BrowserMessageLoopStartTime UMA histogram. |
| 220 void RecordBrowserStartupTime(); | 217 void RecordBrowserStartupTime(); |
| 221 | 218 |
| 222 // Records a time value to an UMA histogram in the context of the | 219 // Records a time value to an UMA histogram in the context of the |
| 223 // PreReadExperiment field-trial. This also reports to the appropriate | 220 // PreReadExperiment field-trial. This also reports to the appropriate |
| 224 // sub-histogram (_PreRead(Enabled|Disabled)). | 221 // sub-histogram (_PreRead(Enabled|Disabled)). |
| 225 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 222 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
| 226 | 223 |
| 227 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 224 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| OLD | NEW |