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

Unified Diff: remoting/host/username.cc

Issue 1863933002: [remoting android] Add and build host code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@android-host-add-native
Patch Set: Add resources_android.cc Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/security_key/gnubby_auth_handler_android.cc ('k') | remoting/remoting_enable.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/username.cc
diff --git a/remoting/host/username.cc b/remoting/host/username.cc
index 712a1555e473f2803a60c3e2c55fffa974d16443..41bf00c20ccb9fcf273f8f9bc6e51d1824ff446b 100644
--- a/remoting/host/username.cc
+++ b/remoting/host/username.cc
@@ -18,7 +18,7 @@
namespace remoting {
std::string GetUsername() {
-#if defined(OS_POSIX)
+#if defined(OS_POSIX) && !defined(OS_ANDROID)
long buf_size = sysconf(_SC_GETPW_R_SIZE_MAX);
if (buf_size <= 0)
return std::string();
@@ -28,10 +28,10 @@ std::string GetUsername() {
struct passwd* passwd_result = nullptr;
getpwuid_r(getuid(), &passwd, &(buf[0]), buf_size, &passwd_result);
return passwd_result ? passwd_result->pw_name : std::string();
-#else // !defined(OS_POSIX)
+#else
NOTIMPLEMENTED();
return std::string();
-#endif // defined(OS_POSIX)
+#endif // defined(OS_POSIX) && !defined(OS_ANDROID)
}
} // namespace remoting
« no previous file with comments | « remoting/host/security_key/gnubby_auth_handler_android.cc ('k') | remoting/remoting_enable.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698