Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: chromecast/base/cast_sys_info_dummy.cc

Issue 1466003003: [Chromecast] Add setters to CastSysInfoDummy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ForTesting. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromecast/base/cast_sys_info_dummy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chromecast/base/cast_sys_info_dummy.h" 5 #include "chromecast/base/cast_sys_info_dummy.h"
6 6
7 namespace chromecast { 7 namespace chromecast {
8 8
9 CastSysInfoDummy::CastSysInfoDummy() { 9 CastSysInfoDummy::CastSysInfoDummy()
10 : build_type_(BUILD_ENG),
11 serial_number_("dummy.serial.number"),
12 factory_country_("US"),
13 factory_locale_("en-US") {
10 } 14 }
11 15
12 CastSysInfoDummy::~CastSysInfoDummy() { 16 CastSysInfoDummy::~CastSysInfoDummy() {
13 } 17 }
14 18
15 CastSysInfo::BuildType CastSysInfoDummy::GetBuildType() { 19 CastSysInfo::BuildType CastSysInfoDummy::GetBuildType() {
16 return BUILD_ENG; 20 return build_type_;
17 } 21 }
18 22
19 std::string CastSysInfoDummy::GetSystemReleaseChannel() { 23 std::string CastSysInfoDummy::GetSystemReleaseChannel() {
20 return ""; 24 return system_release_channel_;
21 } 25 }
22 26
23 std::string CastSysInfoDummy::GetSerialNumber() { 27 std::string CastSysInfoDummy::GetSerialNumber() {
24 return "dummy.serial.number"; 28 return serial_number_;
25 } 29 }
26 30
27 std::string CastSysInfoDummy::GetProductName() { 31 std::string CastSysInfoDummy::GetProductName() {
28 return ""; 32 return product_name_;
29 } 33 }
30 34
31 std::string CastSysInfoDummy::GetDeviceModel() { 35 std::string CastSysInfoDummy::GetDeviceModel() {
32 return ""; 36 return device_model_;
33 } 37 }
34 38
35 std::string CastSysInfoDummy::GetBoardName() { 39 std::string CastSysInfoDummy::GetBoardName() {
36 return ""; 40 return board_name_;
37 } 41 }
38 42
39 std::string CastSysInfoDummy::GetBoardRevision() { 43 std::string CastSysInfoDummy::GetBoardRevision() {
40 return ""; 44 return board_revision_;
41 } 45 }
42 46
43 std::string CastSysInfoDummy::GetManufacturer() { 47 std::string CastSysInfoDummy::GetManufacturer() {
44 return ""; 48 return manufacturer_;
45 } 49 }
46 50
47 std::string CastSysInfoDummy::GetSystemBuildNumber() { 51 std::string CastSysInfoDummy::GetSystemBuildNumber() {
48 return ""; 52 return system_build_number_;
49 } 53 }
50 54
51 std::string CastSysInfoDummy::GetFactoryCountry() { 55 std::string CastSysInfoDummy::GetFactoryCountry() {
52 return "US"; 56 return factory_country_;
53 } 57 }
54 58
55 std::string CastSysInfoDummy::GetFactoryLocale(std::string* second_locale) { 59 std::string CastSysInfoDummy::GetFactoryLocale(std::string* second_locale) {
56 return "en-US"; 60 return factory_locale_;
57 } 61 }
58 62
59 std::string CastSysInfoDummy::GetWifiInterface() { 63 std::string CastSysInfoDummy::GetWifiInterface() {
60 return ""; 64 return wifi_interface_;
61 } 65 }
62 66
63 std::string CastSysInfoDummy::GetApInterface() { 67 std::string CastSysInfoDummy::GetApInterface() {
64 return ""; 68 return ap_interface_;
65 } 69 }
66 70
67 std::string CastSysInfoDummy::GetGlVendor() { 71 std::string CastSysInfoDummy::GetGlVendor() {
68 return ""; 72 return gl_vendor_;
69 } 73 }
70 74
71 std::string CastSysInfoDummy::GetGlRenderer() { 75 std::string CastSysInfoDummy::GetGlRenderer() {
72 return ""; 76 return gl_renderer_;
73 } 77 }
74 78
75 std::string CastSysInfoDummy::GetGlVersion() { 79 std::string CastSysInfoDummy::GetGlVersion() {
76 return ""; 80 return gl_version_;
81 }
82
83 void CastSysInfoDummy::SetBuildTypeForTesting(
84 CastSysInfo::BuildType build_type) {
85 build_type_ = build_type;
86 }
87
88 void CastSysInfoDummy::SetSystemReleaseChannelForTesting(
89 const std::string& system_release_channel) {
90 system_release_channel_ = system_release_channel;
91 }
92
93 void CastSysInfoDummy::SetSerialNumberForTesting(
94 const std::string& serial_number) {
95 serial_number_ = serial_number;
96 }
97
98 void CastSysInfoDummy::SetProductNameForTesting(
99 const std::string& product_name) {
100 product_name_ = product_name;
101 }
102
103 void CastSysInfoDummy::SetDeviceModelForTesting(
104 const std::string& device_model) {
105 device_model_ = device_model;
106 }
107
108 void CastSysInfoDummy::SetBoardNameForTesting(const std::string& board_name) {
109 board_name_ = board_name;
110 }
111
112 void CastSysInfoDummy::SetBoardRevisionForTesting(
113 const std::string& board_revision) {
114 board_revision_ = board_revision;
115 }
116
117 void CastSysInfoDummy::SetManufacturerForTesting(
118 const std::string& manufacturer) {
119 manufacturer_ = manufacturer;
120 }
121
122 void CastSysInfoDummy::SetSystemBuildNumberForTesting(
123 const std::string& system_build_number) {
124 system_build_number_ = system_build_number;
125 }
126
127 void CastSysInfoDummy::SetFactoryCountryForTesting(
128 const std::string& factory_country) {
129 factory_country_ = factory_country;
130 }
131
132 void CastSysInfoDummy::SetFactoryLocaleForTesting(
133 const std::string& factory_locale) {
134 factory_locale_ = factory_locale;
135 }
136
137 void CastSysInfoDummy::SetWifiInterfaceForTesting(
138 const std::string& wifi_interface) {
139 wifi_interface_ = wifi_interface_;
140 }
141
142 void CastSysInfoDummy::SetApInterfaceForTesting(
143 const std::string& ap_interface) {
144 ap_interface_ = ap_interface;
145 }
146
147 void CastSysInfoDummy::SetGlVendorForTesting(const std::string& gl_vendor) {
148 gl_vendor_ = gl_vendor;
149 }
150
151 void CastSysInfoDummy::SetGlRendererForTesting(const std::string& gl_renderer) {
152 gl_renderer_ = gl_renderer;
153 }
154
155 void CastSysInfoDummy::SetGlVersionForTesting(const std::string& gl_version) {
156 gl_version_ = gl_version;
77 } 157 }
78 158
79 } // namespace chromecast 159 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/base/cast_sys_info_dummy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698