| // Copyright 2019 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 CONTENT_COMMON_HISTOGRAM_FETCHER_MOJOM_TEST_UTILS_H_ |
| #define CONTENT_COMMON_HISTOGRAM_FETCHER_MOJOM_TEST_UTILS_H_ |
| |
| #include "content/common/histogram_fetcher.mojom.h" |
| #include "content/common/content_export.h" |
| |
| |
| namespace content { |
| namespace mojom { |
| |
| |
| class CONTENT_EXPORT ChildHistogramFetcherFactoryInterceptorForTesting : public ChildHistogramFetcherFactory { |
| virtual ChildHistogramFetcherFactory* GetForwardingInterface() = 0; |
| void CreateFetcher(base::WritableSharedMemoryRegion shared_memory, ChildHistogramFetcherRequest child_histogram_fetcher) override; |
| }; |
| class CONTENT_EXPORT ChildHistogramFetcherFactoryAsyncWaiter { |
| public: |
| explicit ChildHistogramFetcherFactoryAsyncWaiter(ChildHistogramFetcherFactory* proxy); |
| ~ChildHistogramFetcherFactoryAsyncWaiter(); |
| |
| private: |
| ChildHistogramFetcherFactory* const proxy_; |
| |
| DISALLOW_COPY_AND_ASSIGN(ChildHistogramFetcherFactoryAsyncWaiter); |
| }; |
| |
| |
| class CONTENT_EXPORT ChildHistogramFetcherInterceptorForTesting : public ChildHistogramFetcher { |
| virtual ChildHistogramFetcher* GetForwardingInterface() = 0; |
| void GetChildNonPersistentHistogramData(GetChildNonPersistentHistogramDataCallback callback) override; |
| }; |
| class CONTENT_EXPORT ChildHistogramFetcherAsyncWaiter { |
| public: |
| explicit ChildHistogramFetcherAsyncWaiter(ChildHistogramFetcher* proxy); |
| ~ChildHistogramFetcherAsyncWaiter(); |
| void GetChildNonPersistentHistogramData( |
| std::vector<std::string>* out_deltas); |
| |
| private: |
| ChildHistogramFetcher* const proxy_; |
| |
| DISALLOW_COPY_AND_ASSIGN(ChildHistogramFetcherAsyncWaiter); |
| }; |
| |
| |
| |
| |
| } // namespace mojom |
| } // namespace content |
| |
| #endif // CONTENT_COMMON_HISTOGRAM_FETCHER_MOJOM_TEST_UTILS_H_ |