| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // Constructs metrics service and does related initialization, including | 101 // Constructs metrics service and does related initialization, including |
| 102 // creation of field trials. Call only after labs have been converted to | 102 // creation of field trials. Call only after labs have been converted to |
| 103 // switches. | 103 // switches. |
| 104 void SetupMetricsAndFieldTrials(); | 104 void SetupMetricsAndFieldTrials(); |
| 105 | 105 |
| 106 // Starts recording of metrics. This can only be called after we have a file | 106 // Starts recording of metrics. This can only be called after we have a file |
| 107 // thread. | 107 // thread. |
| 108 void StartMetricsRecording(); | 108 void StartMetricsRecording(); |
| 109 | 109 |
| 110 // Returns true if the user opted in to sending metric reports. |
| 111 bool IsMetricsReportingEnabled(); |
| 112 |
| 110 // Record time from process startup to present time in an UMA histogram. | 113 // Record time from process startup to present time in an UMA histogram. |
| 111 void RecordBrowserStartupTime(); | 114 void RecordBrowserStartupTime(); |
| 112 | 115 |
| 113 // Records a time value to an UMA histogram in the context of the | 116 // Records a time value to an UMA histogram in the context of the |
| 114 // PreReadExperiment field-trial. This also reports to the appropriate | 117 // PreReadExperiment field-trial. This also reports to the appropriate |
| 115 // sub-histogram (_PreRead(Enabled|Disabled)). | 118 // sub-histogram (_PreRead(Enabled|Disabled)). |
| 116 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 119 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
| 117 | 120 |
| 118 // Methods for Main Message Loop ------------------------------------------- | 121 // Methods for Main Message Loop ------------------------------------------- |
| 119 | 122 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 bool restart_last_session_; | 190 bool restart_last_session_; |
| 188 | 191 |
| 189 // Tests can set this to true to disable restricting cookie access in the | 192 // Tests can set this to true to disable restricting cookie access in the |
| 190 // network stack, as this can only be done once. | 193 // network stack, as this can only be done once. |
| 191 static bool disable_enforcing_cookie_policies_for_tests_; | 194 static bool disable_enforcing_cookie_policies_for_tests_; |
| 192 | 195 |
| 193 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 196 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
| 194 }; | 197 }; |
| 195 | 198 |
| 196 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 199 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| OLD | NEW |