+ Fix cloud sprite clipping on 2x
[chromium-blink-merge.git] / components / metrics / test_metrics_service_client.h
blob43600df161f14f0ba4c308a19e42cda1a6f91165
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
6 #define COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_
8 #include <string>
10 #include "components/metrics/metrics_service_client.h"
12 namespace metrics {
14 // A simple concrete implementation of the MetricsServiceClient interface, for
15 // use in tests.
16 class TestMetricsServiceClient : public MetricsServiceClient {
17 public:
18 static const char kBrandForTesting[];
20 TestMetricsServiceClient();
21 virtual ~TestMetricsServiceClient();
23 // MetricsServiceClient:
24 virtual void SetMetricsClientId(const std::string& client_id) OVERRIDE;
25 virtual bool IsOffTheRecordSessionActive() OVERRIDE;
26 virtual int32_t GetProduct() OVERRIDE;
27 virtual std::string GetApplicationLocale() OVERRIDE;
28 virtual bool GetBrand(std::string* brand_code) OVERRIDE;
29 virtual SystemProfileProto::Channel GetChannel() OVERRIDE;
30 virtual std::string GetVersionString() OVERRIDE;
31 virtual void OnLogUploadComplete() OVERRIDE;
32 virtual void StartGatheringMetrics(
33 const base::Closure& done_callback) OVERRIDE;
34 virtual void CollectFinalMetrics(const base::Closure& done_callback)
35 OVERRIDE;
36 virtual scoped_ptr<MetricsLogUploader> CreateUploader(
37 const std::string& server_url,
38 const std::string& mime_type,
39 const base::Callback<void(int)>& on_upload_complete) OVERRIDE;
41 const std::string& get_client_id() const { return client_id_; }
42 void set_version_string(const std::string& str) { version_string_ = str; }
43 void set_product(int32_t product) { product_ = product; }
45 private:
46 std::string client_id_;
47 std::string version_string_;
48 int32_t product_;
50 DISALLOW_COPY_AND_ASSIGN(TestMetricsServiceClient);
53 } // namespace metrics
55 #endif // COMPONENTS_METRICS_TEST_METRICS_SERVICE_CLIENT_H_