| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_APPLICATION_CONTEXT_IMPL_H_ | 5 #ifndef IOS_CHROME_BROWSER_APPLICATION_CONTEXT_IMPL_H_ |
| 6 #define IOS_CHROME_BROWSER_APPLICATION_CONTEXT_IMPL_H_ | 6 #define IOS_CHROME_BROWSER_APPLICATION_CONTEXT_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 metrics::MetricsService* GetMetricsService() override; | 54 metrics::MetricsService* GetMetricsService() override; |
| 55 variations::VariationsService* GetVariationsService() override; | 55 variations::VariationsService* GetVariationsService() override; |
| 56 rappor::RapporService* GetRapporService() override; | 56 rappor::RapporService* GetRapporService() override; |
| 57 net_log::ChromeNetLog* GetNetLog() override; | 57 net_log::ChromeNetLog* GetNetLog() override; |
| 58 network_time::NetworkTimeTracker* GetNetworkTimeTracker() override; | 58 network_time::NetworkTimeTracker* GetNetworkTimeTracker() override; |
| 59 IOSChromeIOThread* GetIOSChromeIOThread() override; | 59 IOSChromeIOThread* GetIOSChromeIOThread() override; |
| 60 gcm::GCMDriver* GetGCMDriver() override; | 60 gcm::GCMDriver* GetGCMDriver() override; |
| 61 component_updater::ComponentUpdateService* GetComponentUpdateService() | 61 component_updater::ComponentUpdateService* GetComponentUpdateService() |
| 62 override; | 62 override; |
| 63 CRLSetFetcher* GetCRLSetFetcher() override; | 63 CRLSetFetcher* GetCRLSetFetcher() override; |
| 64 PhysicalWebDataSource* GetPhysicalWebDataSource() override; | 64 physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() override; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 // Sets the locale used by the application. | 67 // Sets the locale used by the application. |
| 68 void SetApplicationLocale(const std::string& locale); | 68 void SetApplicationLocale(const std::string& locale); |
| 69 | 69 |
| 70 // Create the local state. | 70 // Create the local state. |
| 71 void CreateLocalState(); | 71 void CreateLocalState(); |
| 72 | 72 |
| 73 // Create the gcm driver. | 73 // Create the gcm driver. |
| 74 void CreateGCMDriver(); | 74 void CreateGCMDriver(); |
| 75 | 75 |
| 76 base::ThreadChecker thread_checker_; | 76 base::ThreadChecker thread_checker_; |
| 77 std::unique_ptr<PrefService> local_state_; | 77 std::unique_ptr<PrefService> local_state_; |
| 78 std::unique_ptr<net_log::ChromeNetLog> net_log_; | 78 std::unique_ptr<net_log::ChromeNetLog> net_log_; |
| 79 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_; | 79 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_; |
| 80 std::unique_ptr<IOSChromeIOThread> ios_chrome_io_thread_; | 80 std::unique_ptr<IOSChromeIOThread> ios_chrome_io_thread_; |
| 81 std::unique_ptr<metrics_services_manager::MetricsServicesManager> | 81 std::unique_ptr<metrics_services_manager::MetricsServicesManager> |
| 82 metrics_services_manager_; | 82 metrics_services_manager_; |
| 83 std::unique_ptr<gcm::GCMDriver> gcm_driver_; | 83 std::unique_ptr<gcm::GCMDriver> gcm_driver_; |
| 84 std::unique_ptr<component_updater::ComponentUpdateService> component_updater_; | 84 std::unique_ptr<component_updater::ComponentUpdateService> component_updater_; |
| 85 scoped_refptr<CRLSetFetcher> crl_set_fetcher_; | 85 scoped_refptr<CRLSetFetcher> crl_set_fetcher_; |
| 86 std::unique_ptr<ios::ChromeBrowserStateManager> chrome_browser_state_manager_; | 86 std::unique_ptr<ios::ChromeBrowserStateManager> chrome_browser_state_manager_; |
| 87 std::string application_locale_; | 87 std::string application_locale_; |
| 88 std::unique_ptr<PhysicalWebDataSource> physical_web_data_source_; | 88 std::unique_ptr<physical_web::PhysicalWebDataSource> |
| 89 physical_web_data_source_; |
| 89 | 90 |
| 90 // Sequenced task runner for local state related I/O tasks. | 91 // Sequenced task runner for local state related I/O tasks. |
| 91 const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_; | 92 const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_; |
| 92 | 93 |
| 93 bool was_last_shutdown_clean_; | 94 bool was_last_shutdown_clean_; |
| 94 bool created_local_state_; | 95 bool created_local_state_; |
| 95 | 96 |
| 96 DISALLOW_COPY_AND_ASSIGN(ApplicationContextImpl); | 97 DISALLOW_COPY_AND_ASSIGN(ApplicationContextImpl); |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 #endif // IOS_CHROME_BROWSER_APPLICATION_CONTEXT_IMPL_H_ | 100 #endif // IOS_CHROME_BROWSER_APPLICATION_CONTEXT_IMPL_H_ |
| OLD | NEW |