summaryrefslogtreecommitdiffstats
path: root/ios/chrome/browser/variations/ios_chrome_variations_service_client.h
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2015-10-07 03:52:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-07 10:53:40 +0000
commit267391c2e694607419c9dcc2cb15e5a4423e7ca7 (patch)
tree66f1e5d55ef7d080c69165d6b74be446aca12bbb /ios/chrome/browser/variations/ios_chrome_variations_service_client.h
parentac7b2564c8ee6dc6d483991f47b984a6a3dd87a8 (diff)
downloadchromium_src-267391c2e694607419c9dcc2cb15e5a4423e7ca7.zip
chromium_src-267391c2e694607419c9dcc2cb15e5a4423e7ca7.tar.gz
chromium_src-267391c2e694607419c9dcc2cb15e5a4423e7ca7.tar.bz2
Provides iOS implementation of some metrics services.
Add a method GetNetworkTimeTracker() to ApplicationContext, implement it in ApplicationContextImpl and change BrowserProcess to delegate to this method instead. Provide an implementation of VariationsServiceClient on iOS now that all necessary method are available via IOSChromeVariationsServiceClient. Add support for generating UIStringOverrider on iOS based on the generated grit headers for //components and //ios strings. BUG=516659 Review URL: https://codereview.chromium.org/1392593002 Cr-Commit-Position: refs/heads/master@{#352813}
Diffstat (limited to 'ios/chrome/browser/variations/ios_chrome_variations_service_client.h')
-rw-r--r--ios/chrome/browser/variations/ios_chrome_variations_service_client.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/ios/chrome/browser/variations/ios_chrome_variations_service_client.h b/ios/chrome/browser/variations/ios_chrome_variations_service_client.h
new file mode 100644
index 0000000..6be4a28
--- /dev/null
+++ b/ios/chrome/browser/variations/ios_chrome_variations_service_client.h
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_VARIATIONS_IOS_CHROME_VARIATIONS_SERVICE_CLIENT_H_
+#define IOS_CHROME_BROWSER_VARIATIONS_IOS_CHROME_VARIATIONS_SERVICE_CLIENT_H_
+
+#include "base/macros.h"
+#include "components/variations/service/variations_service_client.h"
+
+// IOSChromeVariationsServiceClient provides an implementation of
+// VariationsServiceClient that depends on ios/chrome/.
+class IOSChromeVariationsServiceClient
+ : public variations::VariationsServiceClient {
+ public:
+ IOSChromeVariationsServiceClient();
+ ~IOSChromeVariationsServiceClient() override;
+
+ private:
+ // variations::VariationsServiceClient implementation.
+ std::string GetApplicationLocale() override;
+ base::SequencedWorkerPool* GetBlockingPool() override;
+ base::Callback<base::Version()> GetVersionForSimulationCallback() override;
+ net::URLRequestContextGetter* GetURLRequestContext() override;
+ network_time::NetworkTimeTracker* GetNetworkTimeTracker() override;
+ version_info::Channel GetChannel() override;
+ bool OverridesRestrictParameter(std::string* parameter) override;
+ void OnInitialStartup() override;
+
+ DISALLOW_COPY_AND_ASSIGN(IOSChromeVariationsServiceClient);
+};
+
+#endif // IOS_CHROME_BROWSER_VARIATIONS_IOS_CHROME_VARIATIONS_SERVICE_CLIENT_H_