Update V8 to version 4.7.21.
[chromium-blink-merge.git] / components / variations / service / variations_service_client.h
blob2f9d141bd1e645f07f763cb53b1b3ab01ef5e73c
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_CLIENT_H_
6 #define COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_CLIENT_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/strings/string16.h"
12 #include "base/version.h"
13 #include "components/version_info/version_info.h"
15 namespace base {
16 class SequencedWorkerPool;
19 namespace net {
20 class URLRequestContextGetter;
23 namespace network_time {
24 class NetworkTimeTracker;
27 namespace chrome_variations {
29 // An abstraction of operations that depend on the embedder's (e.g. Chrome)
30 // environment.
31 class VariationsServiceClient {
32 public:
33 virtual ~VariationsServiceClient() {}
35 // Returns the current application locale (e.g. "en-US").
36 virtual std::string GetApplicationLocale() = 0;
38 // Returns the SequencedWorkerPool on which the VariationsService should run
39 // tasks that may block.
40 virtual base::SequencedWorkerPool* GetBlockingPool() = 0;
42 // Returns a callback that when run returns the base::Version to use for
43 // variations seed simulation. VariationsService guarantees that the callback
44 // will be run on the pool returned by
45 // VariationsServiceClient::GetBlockingPool().
46 virtual base::Callback<base::Version(void)>
47 GetVersionForSimulationCallback() = 0;
49 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0;
50 virtual network_time::NetworkTimeTracker* GetNetworkTimeTracker() = 0;
52 // Gets the channel of the embedder.
53 virtual version_info::Channel GetChannel() = 0;
55 // Allows the embedder to override the string resource specified by |hash|
56 // with |string| in the resource bundle if desired.
57 virtual void OverrideUIString(uint32_t hash,
58 const base::string16& string) = 0;
60 // Called from VariationsService::PerformPreMainMessageLoopStartup().
61 virtual void OnInitialStartup() {}
64 } // namespace chrome_variations
66 #endif // COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_CLIENT_H_