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

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: Created 5 years 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 } 10 : build_type_(BUILD_ENG),
11 system_release_channel_(""),
slan 2015/11/21 01:49:02 Why are any of the "" initializations necessary?
derekjchow1 2015/11/21 01:51:31 Removed.
12 serial_number_("dummy.serial.number"),
13 product_name_(""),
14 device_model_(""),
15 board_name_(""),
16 board_revision_(""),
17 manufacturer_(""),
18 system_build_number_(""),
19 factory_country_("US"),
20 factory_locale_("en-US"),
21 wifi_interface_(""),
22 ap_interface_(""),
23 gl_vendor_(""),
24 gl_renderer_(""),
25 gl_version_("") {}
11 26
12 CastSysInfoDummy::~CastSysInfoDummy() { 27 CastSysInfoDummy::~CastSysInfoDummy() {
13 } 28 }
14 29
15 CastSysInfo::BuildType CastSysInfoDummy::GetBuildType() { 30 CastSysInfo::BuildType CastSysInfoDummy::GetBuildType() {
16 return BUILD_ENG; 31 return build_type_;
17 } 32 }
18 33
19 std::string CastSysInfoDummy::GetSystemReleaseChannel() { 34 std::string CastSysInfoDummy::GetSystemReleaseChannel() {
20 return ""; 35 return system_release_channel_;
21 } 36 }
22 37
23 std::string CastSysInfoDummy::GetSerialNumber() { 38 std::string CastSysInfoDummy::GetSerialNumber() {
24 return "dummy.serial.number"; 39 return serial_number_;
25 } 40 }
26 41
27 std::string CastSysInfoDummy::GetProductName() { 42 std::string CastSysInfoDummy::GetProductName() {
28 return ""; 43 return product_name_;
29 } 44 }
30 45
31 std::string CastSysInfoDummy::GetDeviceModel() { 46 std::string CastSysInfoDummy::GetDeviceModel() {
32 return ""; 47 return device_model_;
33 } 48 }
34 49
35 std::string CastSysInfoDummy::GetBoardName() { 50 std::string CastSysInfoDummy::GetBoardName() {
36 return ""; 51 return board_name_;
37 } 52 }
38 53
39 std::string CastSysInfoDummy::GetBoardRevision() { 54 std::string CastSysInfoDummy::GetBoardRevision() {
40 return ""; 55 return board_revision_;
41 } 56 }
42 57
43 std::string CastSysInfoDummy::GetManufacturer() { 58 std::string CastSysInfoDummy::GetManufacturer() {
44 return ""; 59 return manufacturer_;
45 } 60 }
46 61
47 std::string CastSysInfoDummy::GetSystemBuildNumber() { 62 std::string CastSysInfoDummy::GetSystemBuildNumber() {
48 return ""; 63 return system_build_number_;
49 } 64 }
50 65
51 std::string CastSysInfoDummy::GetFactoryCountry() { 66 std::string CastSysInfoDummy::GetFactoryCountry() {
52 return "US"; 67 return factory_country_;
53 } 68 }
54 69
55 std::string CastSysInfoDummy::GetFactoryLocale(std::string* second_locale) { 70 std::string CastSysInfoDummy::GetFactoryLocale(std::string* second_locale) {
56 return "en-US"; 71 return factory_locale_;
57 } 72 }
58 73
59 std::string CastSysInfoDummy::GetWifiInterface() { 74 std::string CastSysInfoDummy::GetWifiInterface() {
60 return ""; 75 return wifi_interface_;
61 } 76 }
62 77
63 std::string CastSysInfoDummy::GetApInterface() { 78 std::string CastSysInfoDummy::GetApInterface() {
64 return ""; 79 return ap_interface_;
65 } 80 }
66 81
67 std::string CastSysInfoDummy::GetGlVendor() { 82 std::string CastSysInfoDummy::GetGlVendor() {
68 return ""; 83 return gl_vendor_;
69 } 84 }
70 85
71 std::string CastSysInfoDummy::GetGlRenderer() { 86 std::string CastSysInfoDummy::GetGlRenderer() {
72 return ""; 87 return gl_renderer_;
73 } 88 }
74 89
75 std::string CastSysInfoDummy::GetGlVersion() { 90 std::string CastSysInfoDummy::GetGlVersion() {
76 return ""; 91 return gl_version_;
92 }
93
94 void CastSysInfoDummy::SetBuildType(CastSysInfo::BuildType build_type) {
95 build_type_ = build_type;
96 }
97
98 void CastSysInfoDummy::SetSystemReleaseChannel(
99 const std::string& system_release_channel) {
100 system_release_channel_ = system_release_channel;
101 }
102
103 void CastSysInfoDummy::SetSerialNumber(const std::string& serial_number) {
104 serial_number_ = serial_number;
105 }
106
107 void CastSysInfoDummy::SetProductName(const std::string& product_name) {
108 product_name_ = product_name;
109 }
110
111 void CastSysInfoDummy::SetDeviceModel(const std::string& device_model) {
112 device_model_ = device_model;
113 }
114
115 void CastSysInfoDummy::SetBoardName(const std::string& board_name) {
116 board_name_ = board_name;
117 }
118
119 void CastSysInfoDummy::SetBoardRevision(const std::string& board_revision) {
120 board_revision_ = board_revision;
121 }
122
123 void CastSysInfoDummy::SetManufacturer(const std::string& manufacturer) {
124 manufacturer_ = manufacturer;
125 }
126
127 void CastSysInfoDummy::SetSystemBuildNumber(
128 const std::string& system_build_number) {
129 system_build_number_ = system_build_number;
130 }
131
132 void CastSysInfoDummy::SetFactoryCountry(const std::string& factory_country) {
133 factory_country_ = factory_country;
134 }
135
136 void CastSysInfoDummy::SetFactoryLocale(const std::string& factory_locale) {
137 factory_locale_ = factory_locale;
138 }
139
140 void CastSysInfoDummy::SetWifiInterface(const std::string& wifi_interface) {
141 wifi_interface_ = wifi_interface_;
142 }
143
144 void CastSysInfoDummy::SetApInterface(const std::string& ap_interface) {
145 ap_interface_ = ap_interface;
146 }
147
148 void CastSysInfoDummy::SetGlVendor(const std::string& gl_vendor) {
149 gl_vendor_ = gl_vendor;
150 }
151
152 void CastSysInfoDummy::SetGlRenderer(const std::string& gl_renderer) {
153 gl_renderer_ = gl_renderer;
154 }
155
156 void CastSysInfoDummy::SetGlVersion(const std::string& gl_version) {
157 gl_version_ = gl_version;
77 } 158 }
78 159
79 } // namespace chromecast 160 } // 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