| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMECAST_BASE_CAST_SYS_INFO_DUMMY_H_ | 5 #ifndef CHROMECAST_BASE_CAST_SYS_INFO_DUMMY_H_ |
| 6 #define CHROMECAST_BASE_CAST_SYS_INFO_DUMMY_H_ | 6 #define CHROMECAST_BASE_CAST_SYS_INFO_DUMMY_H_ |
| 7 | 7 |
| 8 // Note(slan): This file is needed by internal targets which cannot depend on | 8 // Note(slan): This file is needed by internal targets which cannot depend on |
| 9 // "//base". Amend this include with a comment so gn check ignores it. | 9 // "//base". Amend this include with a comment so gn check ignores it. |
| 10 #include "base/macros.h" // nogncheck | 10 #include "base/macros.h" // nogncheck |
| 11 #include "chromecast/public/cast_sys_info.h" | 11 #include "chromecast/public/cast_sys_info.h" |
| 12 | 12 |
| 13 namespace chromecast { | 13 namespace chromecast { |
| 14 | 14 |
| 15 // Dummy implementation of CastSysInfo. Fields can be overwritten for test. |
| 15 class CastSysInfoDummy : public CastSysInfo { | 16 class CastSysInfoDummy : public CastSysInfo { |
| 16 public: | 17 public: |
| 17 CastSysInfoDummy(); | 18 CastSysInfoDummy(); |
| 18 ~CastSysInfoDummy() override; | 19 ~CastSysInfoDummy() override; |
| 19 | 20 |
| 20 // CastSysInfo implementation: | 21 // CastSysInfo implementation: |
| 21 BuildType GetBuildType() override; | 22 BuildType GetBuildType() override; |
| 22 std::string GetSystemReleaseChannel() override; | 23 std::string GetSystemReleaseChannel() override; |
| 23 std::string GetSerialNumber() override; | 24 std::string GetSerialNumber() override; |
| 24 std::string GetProductName() override; | 25 std::string GetProductName() override; |
| 25 std::string GetDeviceModel() override; | 26 std::string GetDeviceModel() override; |
| 26 std::string GetBoardName() override; | 27 std::string GetBoardName() override; |
| 27 std::string GetBoardRevision() override; | 28 std::string GetBoardRevision() override; |
| 28 std::string GetManufacturer() override; | 29 std::string GetManufacturer() override; |
| 29 std::string GetSystemBuildNumber() override; | 30 std::string GetSystemBuildNumber() override; |
| 30 std::string GetFactoryCountry() override; | 31 std::string GetFactoryCountry() override; |
| 31 std::string GetFactoryLocale(std::string* second_locale) override; | 32 std::string GetFactoryLocale(std::string* second_locale) override; |
| 32 std::string GetWifiInterface() override; | 33 std::string GetWifiInterface() override; |
| 33 std::string GetApInterface() override; | 34 std::string GetApInterface() override; |
| 34 std::string GetGlVendor() override; | 35 std::string GetGlVendor() override; |
| 35 std::string GetGlRenderer() override; | 36 std::string GetGlRenderer() override; |
| 36 std::string GetGlVersion() override; | 37 std::string GetGlVersion() override; |
| 37 | 38 |
| 39 void SetBuildType(BuildType build_type); |
| 40 void SetSystemReleaseChannel(const std::string& system_release_channel); |
| 41 void SetSerialNumber(const std::string& serial_number); |
| 42 void SetProductName(const std::string& product_name); |
| 43 void SetDeviceModel(const std::string& device_model); |
| 44 void SetBoardName(const std::string& board_name); |
| 45 void SetBoardRevision(const std::string& board_revision); |
| 46 void SetManufacturer(const std::string& manufacturer); |
| 47 void SetSystemBuildNumber(const std::string& system_build_number); |
| 48 void SetFactoryCountry(const std::string& factory_country); |
| 49 void SetFactoryLocale(const std::string& factory_locale); |
| 50 void SetWifiInterface(const std::string& wifi_interface); |
| 51 void SetApInterface(const std::string& ap_interface); |
| 52 void SetGlVendor(const std::string& gl_vendor); |
| 53 void SetGlRenderer(const std::string& gl_renderer); |
| 54 void SetGlVersion(const std::string& gl_version); |
| 55 |
| 38 private: | 56 private: |
| 57 BuildType build_type_; |
| 58 std::string system_release_channel_; |
| 59 std::string serial_number_; |
| 60 std::string product_name_; |
| 61 std::string device_model_; |
| 62 std::string board_name_; |
| 63 std::string board_revision_; |
| 64 std::string manufacturer_; |
| 65 std::string system_build_number_; |
| 66 std::string factory_country_; |
| 67 std::string factory_locale_; |
| 68 std::string wifi_interface_; |
| 69 std::string ap_interface_; |
| 70 std::string gl_vendor_; |
| 71 std::string gl_renderer_; |
| 72 std::string gl_version_; |
| 73 |
| 39 DISALLOW_COPY_AND_ASSIGN(CastSysInfoDummy); | 74 DISALLOW_COPY_AND_ASSIGN(CastSysInfoDummy); |
| 40 }; | 75 }; |
| 41 | 76 |
| 42 } // namespace chromecast | 77 } // namespace chromecast |
| 43 | 78 |
| 44 #endif // CHROMECAST_BASE_CAST_SYS_INFO_DUMMY_H_ | 79 #endif // CHROMECAST_BASE_CAST_SYS_INFO_DUMMY_H_ |
| OLD | NEW |