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

Side by Side Diff: webrtc/base/systeminfo.cc

Issue 1323453003: Fixes for PNaCl build of remoting client plugin in chromium. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 months 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 | « webrtc/base/BUILD.gn ('k') | webrtc/modules/desktop_capture/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2008 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 memory = status.ullTotalPhys; 172 memory = status.ullTotalPhys;
173 } else { 173 } else {
174 LOG_GLE(LS_WARNING) << "GlobalMemoryStatusEx failed."; 174 LOG_GLE(LS_WARNING) << "GlobalMemoryStatusEx failed.";
175 } 175 }
176 176
177 #elif defined(WEBRTC_MAC) 177 #elif defined(WEBRTC_MAC)
178 size_t len = sizeof(memory); 178 size_t len = sizeof(memory);
179 int error = sysctlbyname("hw.memsize", &memory, &len, NULL, 0); 179 int error = sysctlbyname("hw.memsize", &memory, &len, NULL, 0);
180 if (error || memory == 0) 180 if (error || memory == 0)
181 memory = -1; 181 memory = -1;
182 #else // WEBRTC_LINUX 182 #elif defined(WEBRTC_LINUX)
183 memory = static_cast<int64>(sysconf(_SC_PHYS_PAGES)) * 183 memory = static_cast<int64>(sysconf(_SC_PHYS_PAGES)) *
184 static_cast<int64>(sysconf(_SC_PAGESIZE)); 184 static_cast<int64>(sysconf(_SC_PAGESIZE));
185 if (memory < 0) { 185 if (memory < 0) {
186 LOG(LS_WARNING) << "sysconf(_SC_PHYS_PAGES) failed." 186 LOG(LS_WARNING) << "sysconf(_SC_PHYS_PAGES) failed."
187 << "sysconf(_SC_PHYS_PAGES) " << sysconf(_SC_PHYS_PAGES) 187 << "sysconf(_SC_PHYS_PAGES) " << sysconf(_SC_PHYS_PAGES)
188 << "sysconf(_SC_PAGESIZE) " << sysconf(_SC_PAGESIZE); 188 << "sysconf(_SC_PAGESIZE) " << sysconf(_SC_PAGESIZE);
189 memory = -1; 189 memory = -1;
190 } 190 }
191 #endif 191 #endif
192 192
(...skipping 11 matching lines...) Expand all
204 int error = sysctlbyname("hw.model", buffer, &length, NULL, 0); 204 int error = sysctlbyname("hw.model", buffer, &length, NULL, 0);
205 if (!error) 205 if (!error)
206 return std::string(buffer, length - 1); 206 return std::string(buffer, length - 1);
207 return std::string(); 207 return std::string();
208 #else 208 #else
209 return "Not available"; 209 return "Not available";
210 #endif 210 #endif
211 } 211 }
212 212
213 } // namespace rtc 213 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/BUILD.gn ('k') | webrtc/modules/desktop_capture/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698