| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 IOS_CHROME_BROWSER_IOS_CHROME_MAIN_PARTS_H_ | 5 #ifndef IOS_CHROME_BROWSER_IOS_CHROME_MAIN_PARTS_H_ |
| 6 #define IOS_CHROME_BROWSER_IOS_CHROME_MAIN_PARTS_H_ | 6 #define IOS_CHROME_BROWSER_IOS_CHROME_MAIN_PARTS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 ~IOSChromeMainParts() override; | 29 ~IOSChromeMainParts() override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // web::WebMainParts implementation. | 32 // web::WebMainParts implementation. |
| 33 void PreMainMessageLoopStart() override; | 33 void PreMainMessageLoopStart() override; |
| 34 void PreCreateThreads() override; | 34 void PreCreateThreads() override; |
| 35 void PreMainMessageLoopRun() override; | 35 void PreMainMessageLoopRun() override; |
| 36 void PostMainMessageLoopRun() override; | 36 void PostMainMessageLoopRun() override; |
| 37 void PostDestroyThreads() override; | 37 void PostDestroyThreads() override; |
| 38 | 38 |
| 39 // Constructs metrics service and does related initialization, including | 39 // Sets up the field trials and related initialization. Call only after |
| 40 // creation of field trials. Call only after labs have been converted to | 40 // about:flags have been converted to switches. |
| 41 // switches. | 41 void SetupFieldTrials(); |
| 42 void SetUpMetricsAndFieldTrials(); | 42 |
| 43 // Constructs the metrics service and initializes metrics recording. |
| 44 void SetupMetrics(); |
| 43 | 45 |
| 44 // Starts recording of metrics. This can only be called after we have a file | 46 // Starts recording of metrics. This can only be called after we have a file |
| 45 // thread. | 47 // thread. |
| 46 void StartMetricsRecording(); | 48 void StartMetricsRecording(); |
| 47 | 49 |
| 48 const base::CommandLine& parsed_command_line_; | 50 const base::CommandLine& parsed_command_line_; |
| 49 | 51 |
| 50 std::unique_ptr<ApplicationContextImpl> application_context_; | 52 std::unique_ptr<ApplicationContextImpl> application_context_; |
| 51 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; | 53 scoped_refptr<metrics::TrackingSynchronizer> tracking_synchronizer_; |
| 52 | 54 |
| 53 // Statistical testing infrastructure for the entire browser. NULL until | 55 // Statistical testing infrastructure for the entire browser. NULL until |
| 54 // SetUpMetricsAndFieldTrials is called. | 56 // SetUpMetricsAndFieldTrials is called. |
| 55 std::unique_ptr<base::FieldTrialList> field_trial_list_; | 57 std::unique_ptr<base::FieldTrialList> field_trial_list_; |
| 56 | 58 |
| 57 PrefService* local_state_; | 59 PrefService* local_state_; |
| 58 | 60 |
| 59 // Initialized in SetupMetricsAndFieldTrials. | 61 // Initialized in SetupMetricsAndFieldTrials. |
| 60 std::unique_ptr<ios::FieldTrialSynchronizer> field_trial_synchronizer_; | 62 std::unique_ptr<ios::FieldTrialSynchronizer> field_trial_synchronizer_; |
| 61 | 63 |
| 62 DISALLOW_COPY_AND_ASSIGN(IOSChromeMainParts); | 64 DISALLOW_COPY_AND_ASSIGN(IOSChromeMainParts); |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 #endif // IOS_CHROME_BROWSER_IOS_CHROME_MAIN_PARTS_H_ | 67 #endif // IOS_CHROME_BROWSER_IOS_CHROME_MAIN_PARTS_H_ |
| OLD | NEW |