| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_ | 5 #ifndef COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_ |
| 6 #define COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_ | 6 #define COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace base { |
| 11 class SequencedWorkerPool; |
| 12 } |
| 13 |
| 10 namespace net { | 14 namespace net { |
| 11 class URLRequestContextGetter; | 15 class URLRequestContextGetter; |
| 12 } | 16 } |
| 13 | 17 |
| 14 namespace network_time { | 18 namespace network_time { |
| 15 class NetworkTimeTracker; | 19 class NetworkTimeTracker; |
| 16 } | 20 } |
| 17 | 21 |
| 18 namespace chrome_variations { | 22 namespace chrome_variations { |
| 19 | 23 |
| 20 // An abstraction of operations that depend on the embedder's (e.g. Chrome) | 24 // An abstraction of operations that depend on the embedder's (e.g. Chrome) |
| 21 // environment. | 25 // environment. |
| 22 class VariationsServiceClient { | 26 class VariationsServiceClient { |
| 23 public: | 27 public: |
| 24 virtual ~VariationsServiceClient() {} | 28 virtual ~VariationsServiceClient() {} |
| 25 | 29 |
| 26 // Returns the current application locale (e.g. "en-US"). | 30 // Returns the current application locale (e.g. "en-US"). |
| 27 virtual std::string GetApplicationLocale() = 0; | 31 virtual std::string GetApplicationLocale() = 0; |
| 28 | 32 |
| 33 // Returns the SequencedWorkerPool on which the VariationsService should run |
| 34 // tasks that may block. |
| 35 virtual base::SequencedWorkerPool* GetBlockingPool() = 0; |
| 36 |
| 29 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; | 37 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; |
| 30 virtual network_time::NetworkTimeTracker* GetNetworkTimeTracker() = 0; | 38 virtual network_time::NetworkTimeTracker* GetNetworkTimeTracker() = 0; |
| 31 | 39 |
| 32 // Called from VariationsService::PerformPreMainMessageLoopStartup(). | 40 // Called from VariationsService::PerformPreMainMessageLoopStartup(). |
| 33 virtual void OnInitialStartup() {} | 41 virtual void OnInitialStartup() {} |
| 34 }; | 42 }; |
| 35 | 43 |
| 36 } // namespace chrome_variations | 44 } // namespace chrome_variations |
| 37 | 45 |
| 38 #endif // COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_ | 46 #endif // COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_ |
| OLD | NEW |