weblayer_variations_service_client.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2019 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. #ifndef WEBLAYER_BROWSER_WEBLAYER_VARIATIONS_SERVICE_CLIENT_H_
  5. #define WEBLAYER_BROWSER_WEBLAYER_VARIATIONS_SERVICE_CLIENT_H_
  6. #include <string>
  7. #include "base/memory/raw_ptr.h"
  8. #include "base/memory/scoped_refptr.h"
  9. #include "components/variations/service/variations_service_client.h"
  10. namespace weblayer {
  11. class SystemNetworkContextManager;
  12. // WebLayerVariationsServiceClient provides an implementation of
  13. // VariationsServiceClient, all members are currently stubs for WebLayer.
  14. class WebLayerVariationsServiceClient
  15. : public variations::VariationsServiceClient {
  16. public:
  17. explicit WebLayerVariationsServiceClient(
  18. SystemNetworkContextManager* network_context_manager);
  19. WebLayerVariationsServiceClient(const WebLayerVariationsServiceClient&) =
  20. delete;
  21. WebLayerVariationsServiceClient& operator=(
  22. const WebLayerVariationsServiceClient&) = delete;
  23. ~WebLayerVariationsServiceClient() override;
  24. private:
  25. // variations::VariationsServiceClient:
  26. base::Version GetVersionForSimulation() override;
  27. scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
  28. network_time::NetworkTimeTracker* GetNetworkTimeTracker() override;
  29. version_info::Channel GetChannel() override;
  30. bool OverridesRestrictParameter(std::string* parameter) override;
  31. bool IsEnterprise() override;
  32. raw_ptr<SystemNetworkContextManager> network_context_manager_;
  33. };
  34. } // namespace weblayer
  35. #endif // WEBLAYER_BROWSER_WEBLAYER_VARIATIONS_SERVICE_CLIENT_H_