1 https://code.google.com/p/chromium/issues/detail?id=123827
3 Index: sync/sync_core.gypi
4 ===================================================================
5 --- sync/sync_core.gypi (revision 198703)
6 +++ sync/sync_core.gypi (revision 198704)
8 'util/get_session_name.h',
9 'util/get_session_name_ios.mm',
10 'util/get_session_name_ios.h',
11 + 'util/get_session_name_linux.cc',
12 + 'util/get_session_name_linux.h',
13 'util/get_session_name_mac.mm',
14 'util/get_session_name_mac.h',
15 'util/get_session_name_win.cc',
16 Index: sync/util/get_session_name_linux.h
17 ===================================================================
18 --- sync/util/get_session_name_linux.h (revision 0)
19 +++ sync/util/get_session_name_linux.h (revision 198704)
21 +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
22 +// Use of this source code is governed by a BSD-style license that can be
23 +// found in the LICENSE file.
25 +#ifndef SYNC_UTIL_GET_SESSION_NAME_LINUX_H_
26 +#define SYNC_UTIL_GET_SESSION_NAME_LINUX_H_
33 +std::string GetHostname();
35 +} // namespace internal
36 +} // namespace syncer
38 +#endif // SYNC_UTIL_GET_SESSION_NAME_LINUX_H_
41 Property changes on: sync/util/get_session_name_linux.h
42 ___________________________________________________________________
46 \ No newline at end of property
47 Index: sync/util/get_session_name.cc
48 ===================================================================
49 --- sync/util/get_session_name.cc (revision 198703)
50 +++ sync/util/get_session_name.cc (revision 198704)
52 #include "base/command_line.h"
53 #include "chromeos/chromeos_switches.h"
54 #elif defined(OS_LINUX)
55 -#include "base/linux_util.h"
56 +#include "sync/util/get_session_name_linux.h"
58 #include "sync/util/get_session_name_ios.h"
59 #elif defined(OS_MACOSX)
61 // "CHROMEOS_RELEASE_BOARD" line in chrome://system.
62 session_name = board.substr(0, 6) == "stumpy" ? "Chromebox" : "Chromebook";
63 #elif defined(OS_LINUX)
64 - session_name = base::GetLinuxDistro();
65 + session_name = internal::GetHostname();
67 session_name = internal::GetComputerName();
68 #elif defined(OS_MACOSX)
69 Index: sync/util/get_session_name_linux.cc
70 ===================================================================
71 --- sync/util/get_session_name_linux.cc (revision 0)
72 +++ sync/util/get_session_name_linux.cc (revision 198704)
74 +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
75 +// Use of this source code is governed by a BSD-style license that can be
76 +// found in the LICENSE file.
78 +#include "sync/util/get_session_name_linux.h"
80 +#include <limits.h> // for HOST_NAME_MAX
81 +#include <unistd.h> // for gethostname()
83 +#include "base/linux_util.h"
88 +std::string GetHostname() {
89 + char hostname[HOST_NAME_MAX];
90 + if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success.
92 + return base::GetLinuxDistro();
95 +} // namespace internal
96 +} // namespace syncer
99 Property changes on: sync/util/get_session_name_linux.cc
100 ___________________________________________________________________
104 \ No newline at end of property