Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: components/variations/variations_service_client.h

Issue 1306893007: //components/variations: Create separate target for VariationsService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/variations/service/variations_service_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_
6 #define COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/version.h"
12
13 namespace base {
14 class SequencedWorkerPool;
15 }
16
17 namespace net {
18 class URLRequestContextGetter;
19 }
20
21 namespace network_time {
22 class NetworkTimeTracker;
23 }
24
25 namespace chrome_variations {
26
27 // An abstraction of operations that depend on the embedder's (e.g. Chrome)
28 // environment.
29 class VariationsServiceClient {
30 public:
31 virtual ~VariationsServiceClient() {}
32
33 // Returns the current application locale (e.g. "en-US").
34 virtual std::string GetApplicationLocale() = 0;
35
36 // Returns the SequencedWorkerPool on which the VariationsService should run
37 // tasks that may block.
38 virtual base::SequencedWorkerPool* GetBlockingPool() = 0;
39
40 // Returns a callback that when run returns the base::Version to use for
41 // variations seed simulation. VariationsService guarantees that the callback
42 // will be run on the pool returned by
43 // VariationsServiceClient::GetBlockingPool().
44 virtual base::Callback<base::Version(void)>
45 GetVersionForSimulationCallback() = 0;
46
47 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0;
48 virtual network_time::NetworkTimeTracker* GetNetworkTimeTracker() = 0;
49
50 // Called from VariationsService::PerformPreMainMessageLoopStartup().
51 virtual void OnInitialStartup() {}
52 };
53
54 } // namespace chrome_variations
55
56 #endif // COMPONENTS_VARIATIONS_VARIATIONS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « components/variations/service/variations_service_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698