[packages/chromium-browser/dev-27] update sync name patch from crbug.com/123827, uses hostname now

glen glen at pld-linux.org
Tue May 7 19:37:05 CEST 2013


commit effb85eb19539dccebb53180673f41cf57bc5575
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue May 7 20:34:47 2013 +0300

    update sync name patch from crbug.com/123827, uses hostname now
    
    patch checked out as:
    svn diff -c 198704 http://src.chromium.org/svn/trunk/src/

 chromium-browser.spec   |   4 +-
 sync-session-name.patch | 105 +++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 98 insertions(+), 11 deletions(-)
---
diff --git a/chromium-browser.spec b/chromium-browser.spec
index 9fa34ec..4a20540 100644
--- a/chromium-browser.spec
+++ b/chromium-browser.spec
@@ -69,7 +69,7 @@ Version:	%{branch}.%{patchver}
 %else
 Version:	%{branch}.%{basever}
 %endif
-Release:	0.13
+Release:	0.16
 License:	BSD, LGPL v2+ (ffmpeg)
 Group:		X11/Applications/Networking
 Source0:	http://carme.pld-linux.org/~glen/chromium-browser/src/beta/%{name}-%{branch}.%{basever}.tar.gz
@@ -293,7 +293,7 @@ ln -s %{SOURCE7} .
 %patch26 -p2
 %patch29 -p2
 %patch30 -p0
-%patch31 -p1
+%patch31 -p0
 
 sh -x clean-source.sh \
 	%{!?with_nacl:nacl=0} \
diff --git a/sync-session-name.patch b/sync-session-name.patch
index f23b48c..09fd7b6 100644
--- a/sync-session-name.patch
+++ b/sync-session-name.patch
@@ -1,17 +1,104 @@
 https://code.google.com/p/chromium/issues/detail?id=123827
---- chromium-browser-27.0.1453.73/sync/util/get_session_name.cc~	2013-04-30 10:20:51.000000000 +0300
-+++ chromium-browser-27.0.1453.73/sync/util/get_session_name.cc	2013-05-04 16:47:18.472330715 +0300
-@@ -60,7 +60,12 @@
+
+Index: sync/sync_core.gypi
+===================================================================
+--- sync/sync_core.gypi	(revision 198703)
++++ sync/sync_core.gypi	(revision 198704)
+@@ -181,6 +181,8 @@
+     'util/get_session_name.h',
+     'util/get_session_name_ios.mm',
+     'util/get_session_name_ios.h',
++    'util/get_session_name_linux.cc',
++    'util/get_session_name_linux.h',
+     'util/get_session_name_mac.mm',
+     'util/get_session_name_mac.h',
+     'util/get_session_name_win.cc',
+Index: sync/util/get_session_name_linux.h
+===================================================================
+--- sync/util/get_session_name_linux.h	(revision 0)
++++ sync/util/get_session_name_linux.h	(revision 198704)
+@@ -0,0 +1,19 @@
++// Copyright (c) 2013 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef SYNC_UTIL_GET_SESSION_NAME_LINUX_H_
++#define SYNC_UTIL_GET_SESSION_NAME_LINUX_H_
++
++#include <string>
++
++namespace syncer {
++namespace internal {
++
++std::string GetHostname();
++
++}  // namespace internal
++}  // namespace syncer
++
++#endif  // SYNC_UTIL_GET_SESSION_NAME_LINUX_H_
++
+
+Property changes on: sync/util/get_session_name_linux.h
+___________________________________________________________________
+Added: svn:eol-style
+## -0,0 +1 ##
++LF
+\ No newline at end of property
+Index: sync/util/get_session_name.cc
+===================================================================
+--- sync/util/get_session_name.cc	(revision 198703)
++++ sync/util/get_session_name.cc	(revision 198704)
+@@ -15,7 +15,7 @@
+ #include "base/command_line.h"
+ #include "chromeos/chromeos_switches.h"
+ #elif defined(OS_LINUX)
+-#include "base/linux_util.h"
++#include "sync/util/get_session_name_linux.h"
+ #elif defined(OS_IOS)
+ #include "sync/util/get_session_name_ios.h"
+ #elif defined(OS_MACOSX)
+@@ -60,7 +60,7 @@
    // "CHROMEOS_RELEASE_BOARD" line in chrome://system.
    session_name = board.substr(0, 6) == "stumpy" ? "Chromebox" : "Chromebook";
  #elif defined(OS_LINUX)
 -  session_name = base::GetLinuxDistro();
-+  const char* env_session_name = getenv("SYNC_SESSION_NAME");
-+  if (env_session_name && *env_session_name) {
-+    session_name = std::string(env_session_name);
-+  } else {
-+    session_name = base::GetLinuxDistro();
-+  }
++  session_name = internal::GetHostname();
  #elif defined(OS_IOS)
    session_name = internal::GetComputerName();
  #elif defined(OS_MACOSX)
+Index: sync/util/get_session_name_linux.cc
+===================================================================
+--- sync/util/get_session_name_linux.cc	(revision 0)
++++ sync/util/get_session_name_linux.cc	(revision 198704)
+@@ -0,0 +1,24 @@
++// Copyright (c) 2013 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "sync/util/get_session_name_linux.h"
++
++#include <limits.h>  // for HOST_NAME_MAX
++#include <unistd.h>  // for gethostname()
++
++#include "base/linux_util.h"
++
++namespace syncer {
++namespace internal {
++
++std::string GetHostname() {
++  char hostname[HOST_NAME_MAX];
++  if (gethostname(hostname, HOST_NAME_MAX) == 0)  // Success.
++    return hostname;
++  return base::GetLinuxDistro();
++}
++
++}  // namespace internal
++}  // namespace syncer
++
+
+Property changes on: sync/util/get_session_name_linux.cc
+___________________________________________________________________
+Added: svn:eol-style
+## -0,0 +1 ##
++LF
+\ No newline at end of property
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/chromium-browser.git/commitdiff/effb85eb19539dccebb53180673f41cf57bc5575



More information about the pld-cvs-commit mailing list