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

Side by Side Diff: sync/util/get_session_name_linux.cc

Issue 14963003: Use the machine hostname on Linux machines for the sync session name rather than (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
Nicolas Zea 2013/05/06 17:54:09 here too
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "sync/util/get_session_name_linux.h"
6
7 #include <limits.h> // for HOST_NAME_MAX
8 #include <unistd.h> // for gethostname()
9
10 #include "base/linux_util.h"
11
12 namespace syncer {
13 namespace internal {
14
15 std::string GetHostname() {
16 char hostname[HOST_NAME_MAX];
17 if (gethostname(hostname, HOST_NAME_MAX) == 0) // success
Nicolas Zea 2013/05/06 17:54:09 nit: "success" -> "Success."
18 return hostname;
19 return base::GetLinuxDistro();
20 }
21
22 } // namespace internal
23 } // namespace syncer
24
OLDNEW
« sync/util/get_session_name_linux.h ('K') | « sync/util/get_session_name_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698