| 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_H_ | 5 #ifndef IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_ |
| 6 #define IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_ | 6 #define IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace net_log { | 24 namespace net_log { |
| 25 class ChromeNetLog; | 25 class ChromeNetLog; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace network_time { | 28 namespace network_time { |
| 29 class NetworkTimeTracker; | 29 class NetworkTimeTracker; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace policy { | |
| 33 class BrowserPolicyConnector; | |
| 34 class PolicyService; | |
| 35 } | |
| 36 | |
| 37 namespace rappor { | 32 namespace rappor { |
| 38 class RapporService; | 33 class RapporService; |
| 39 } | 34 } |
| 40 | 35 |
| 41 namespace variations { | 36 namespace variations { |
| 42 class VariationsService; | 37 class VariationsService; |
| 43 } | 38 } |
| 44 | 39 |
| 45 class ApplicationContext; | 40 class ApplicationContext; |
| 46 class PrefService; | 41 class PrefService; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 77 | 72 |
| 78 // Gets the ChromeBrowserStateManager used by this application. | 73 // Gets the ChromeBrowserStateManager used by this application. |
| 79 virtual ios::ChromeBrowserStateManager* GetChromeBrowserStateManager() = 0; | 74 virtual ios::ChromeBrowserStateManager* GetChromeBrowserStateManager() = 0; |
| 80 | 75 |
| 81 // Gets the MetricsService used by this application. | 76 // Gets the MetricsService used by this application. |
| 82 virtual metrics::MetricsService* GetMetricsService() = 0; | 77 virtual metrics::MetricsService* GetMetricsService() = 0; |
| 83 | 78 |
| 84 // Gets the VariationsService used by this application. | 79 // Gets the VariationsService used by this application. |
| 85 virtual variations::VariationsService* GetVariationsService() = 0; | 80 virtual variations::VariationsService* GetVariationsService() = 0; |
| 86 | 81 |
| 87 // Gets the policy connector, creating and starting it if necessary. | |
| 88 virtual policy::BrowserPolicyConnector* GetBrowserPolicyConnector() = 0; | |
| 89 | |
| 90 // Gets the policy service. | |
| 91 virtual policy::PolicyService* GetPolicyService() = 0; | |
| 92 | |
| 93 // Gets the RapporService. May return null. | 82 // Gets the RapporService. May return null. |
| 94 virtual rappor::RapporService* GetRapporService() = 0; | 83 virtual rappor::RapporService* GetRapporService() = 0; |
| 95 | 84 |
| 96 // Gets the ChromeNetLog. | 85 // Gets the ChromeNetLog. |
| 97 virtual net_log::ChromeNetLog* GetNetLog() = 0; | 86 virtual net_log::ChromeNetLog* GetNetLog() = 0; |
| 98 | 87 |
| 99 // Gets the NetworkTimeTracker. | 88 // Gets the NetworkTimeTracker. |
| 100 virtual network_time::NetworkTimeTracker* GetNetworkTimeTracker() = 0; | 89 virtual network_time::NetworkTimeTracker* GetNetworkTimeTracker() = 0; |
| 101 | 90 |
| 102 protected: | 91 protected: |
| 103 // Sets the global ApplicationContext instance. | 92 // Sets the global ApplicationContext instance. |
| 104 static void SetApplicationContext(ApplicationContext* context); | 93 static void SetApplicationContext(ApplicationContext* context); |
| 105 | 94 |
| 106 private: | 95 private: |
| 107 DISALLOW_COPY_AND_ASSIGN(ApplicationContext); | 96 DISALLOW_COPY_AND_ASSIGN(ApplicationContext); |
| 108 }; | 97 }; |
| 109 | 98 |
| 110 #endif // IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_ | 99 #endif // IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_ |
| OLD | NEW |