summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 22:02:08 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 22:02:08 +0000
commit6760cf3b18c9faf534fecfe4b0842abfde83b2ed (patch)
tree77f69f5cea7996cdad5ae4aaa63658bb0c801ac7 /remoting
parent8a7389ad398cd17785281ccc74421956c72f0f38 (diff)
downloadchromium_src-6760cf3b18c9faf534fecfe4b0842abfde83b2ed.zip
chromium_src-6760cf3b18c9faf534fecfe4b0842abfde83b2ed.tar.gz
chromium_src-6760cf3b18c9faf534fecfe4b0842abfde83b2ed.tar.bz2
1. Revisited branding (Chrome Remote Desktop vs Chromoting).
2. Chromoting is versioned separately from Chrome now. 3. Moved logs to a writable location on Windows. Review URL: https://chromiumcodereview.appspot.com/9924011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/VERSION4
-rw-r--r--remoting/chromium_branding8
-rw-r--r--remoting/google_chrome_branding6
-rw-r--r--remoting/host/branding.cc51
-rw-r--r--remoting/host/branding.h17
-rw-r--r--remoting/host/elevated_controller.rc6
-rw-r--r--remoting/host/host_service.rc5
-rw-r--r--remoting/host/host_service_win.cc12
-rw-r--r--remoting/host/installer/chromoting.wxs25
-rw-r--r--remoting/host/remoting_me2me_host.cc45
-rw-r--r--remoting/remoting.gyp28
-rw-r--r--remoting/version.rc.version6
12 files changed, 156 insertions, 57 deletions
diff --git a/remoting/VERSION b/remoting/VERSION
new file mode 100644
index 0000000..ded3640
--- /dev/null
+++ b/remoting/VERSION
@@ -0,0 +1,4 @@
+MAJOR=1
+MINOR=0
+BUILD=1
+PATCH=0
diff --git a/remoting/chromium_branding b/remoting/chromium_branding
index 88780c3..b6e0567 100644
--- a/remoting/chromium_branding
+++ b/remoting/chromium_branding
@@ -1,11 +1,7 @@
COMPANY_FULLNAME=The Chromium Authors
-PRODUCT_FULLNAME=Chromium
+PRODUCT_FULLNAME=Chromoting
COPYRIGHT=Copyright (C) 2012 The Chromium Authors. All Rights Reserved.
HOST_PLUGIN_FILE_DESCRIPTION=Allow another user to access your computer securely over the Internet.
-HOST_PLUGIN_PRODUCT_FULLNAME=Chromoting Host
ME2ME_HOST_FILE_DESCRIPTION=Chromoting Host
-ME2ME_HOST_PRODUCT_FULLNAME=Chromoting
SERVICE_FILE_DESCRIPTION=Chromoting Service
-SERVICE_PRODUCT_FULLNAME=Chromoting
-SERVICE_CONTROLLER_FILE_DESCRIPTION=Chromoting Service Controller
-SERVICE_CONTROLLER_PRODUCT_FULLNAME=Chromoting
+SERVICE_CONTROLLER_FILE_DESCRIPTION=Chromoting Host Controller
diff --git a/remoting/google_chrome_branding b/remoting/google_chrome_branding
index 06cf118..ba19927 100644
--- a/remoting/google_chrome_branding
+++ b/remoting/google_chrome_branding
@@ -2,10 +2,6 @@ COMPANY_FULLNAME=Google Inc.
PRODUCT_FULLNAME=Chrome Remote Desktop
COPYRIGHT=Copyright (C) 2012 Google Inc. All Rights Reserved.
HOST_PLUGIN_FILE_DESCRIPTION=Allow another user to access your computer securely over the Internet.
-HOST_PLUGIN_PRODUCT_FULLNAME=Chrome Remote Desktop Host
ME2ME_HOST_FILE_DESCRIPTION=Chrome Remote Desktop Host
-ME2ME_HOST_PRODUCT_FULLNAME=Chrome Remote Desktop
SERVICE_FILE_DESCRIPTION=Chrome Remote Desktop Service
-SERVICE_PRODUCT_FULLNAME=Chrome Remote Desktop
-SERVICE_CONTROLLER_FILE_DESCRIPTION=Chrome Remote Desktop Controller
-SERVICE_CONTROLLER_PRODUCT_FULLNAME=Chrome Remote Desktop
+SERVICE_CONTROLLER_FILE_DESCRIPTION=Chrome Remote Desktop Host Controller
diff --git a/remoting/host/branding.cc b/remoting/host/branding.cc
new file mode 100644
index 0000000..0c3f38a
--- /dev/null
+++ b/remoting/host/branding.cc
@@ -0,0 +1,51 @@
+// Copyright (c) 2012 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 "remoting/host/branding.h"
+
+#include "base/file_util.h"
+#include "base/path_service.h"
+
+namespace {
+
+// TODO(lambroslambrou): The default locations should depend on whether Chrome
+// branding is enabled - this means also modifying the Python daemon script.
+// The actual location of the files is ultimately determined by the service
+// daemon and NPAPI implementation - these defaults are only used in case the
+// command-line switches are absent.
+#if defined(OS_WIN)
+#ifdef OFFICIAL_BUILD
+const FilePath::CharType kConfigDir[] =
+ FILE_PATH_LITERAL("Google\\Chrome Remote Desktop");
+#else
+const FilePath::CharType kConfigDir[] =
+ FILE_PATH_LITERAL("Chromoting");
+#endif
+#elif defined(OS_MACOSX)
+const FilePath::CharType kConfigDir[] =
+ FILE_PATH_LITERAL("Chrome Remote Desktop");
+#else
+const FilePath::CharType kConfigDir[] =
+ FILE_PATH_LITERAL(".config/chrome-remote-desktop");
+#endif
+
+} // namespace
+
+namespace remoting {
+
+FilePath GetConfigDir() {
+ FilePath app_data_dir;
+
+#if defined(OS_WIN)
+ PathService::Get(base::DIR_LOCAL_APP_DATA, &app_data_dir);
+#elif defined(OS_MACOSX)
+ PathService::Get(base::DIR_APP_DATA, &app_data_dir);
+#else
+ app_data_dir = file_util::GetHomeDir();
+#endif
+
+ return app_data_dir.Append(kConfigDir);
+}
+
+} // namespace remoting
diff --git a/remoting/host/branding.h b/remoting/host/branding.h
new file mode 100644
index 0000000..df44732
--- /dev/null
+++ b/remoting/host/branding.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2012 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 REMOTING_HOST_BRANDING_H_
+#define REMOTING_HOST_BRANDING_H_
+
+#include "base/file_path.h"
+
+namespace remoting {
+
+// Returns the location of the host configuration directory.
+FilePath GetConfigDir();
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_BRANDING_H_
diff --git a/remoting/host/elevated_controller.rc b/remoting/host/elevated_controller.rc
index 5dc2361..61636d5 100644
--- a/remoting/host/elevated_controller.rc
+++ b/remoting/host/elevated_controller.rc
@@ -12,7 +12,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
- 100 "Chrome Remote Desktop Service Controller"
+#ifdef OFFICIAL_BUILD
+ 100 "Chrome Remote Desktop Host Controller"
+#else
+ 100 "Chromoting Host Controller"
+#endif
END
#endif // English (U.S.) resources
diff --git a/remoting/host/host_service.rc b/remoting/host/host_service.rc
index e173708..98e7a56 100644
--- a/remoting/host/host_service.rc
+++ b/remoting/host/host_service.rc
@@ -54,8 +54,13 @@ END
STRINGTABLE
BEGIN
+#ifdef OFFICIAL_BUILD
IDS_DISPLAY_SERVICE_NAME "Chrome Remote Desktop Service"
IDS_SERVICE_DESCRIPTION "This service enables incoming connections from Chrome Remote Desktop clients."
+#else
+ IDS_DISPLAY_SERVICE_NAME "Chromoting Service"
+ IDS_SERVICE_DESCRIPTION "This service enables incoming connections from Chromoting clients."
+#endif
END
#endif // English (U.S.) resources
diff --git a/remoting/host/host_service_win.cc b/remoting/host/host_service_win.cc
index a404e6e..ff19dff 100644
--- a/remoting/host/host_service_win.cc
+++ b/remoting/host/host_service_win.cc
@@ -24,8 +24,9 @@
#include "base/utf_string_conversions.h"
#include "base/win/wrapped_window_proc.h"
-#include "remoting/host/host_service_resource.h"
#include "remoting/base/scoped_sc_handle_win.h"
+#include "remoting/host/branding.h"
+#include "remoting/host/host_service_resource.h"
#include "remoting/host/wts_console_observer_win.h"
#include "remoting/host/wts_session_process_launcher_win.h"
@@ -570,6 +571,15 @@ int main(int argc, char** argv) {
// FilePath, LazyInstance, MessageLoop).
base::AtExitManager exit_manager;
+ // Write logs to the application profile directory.
+ FilePath debug_log = remoting::GetConfigDir().
+ Append(FILE_PATH_LITERAL("debug.log"));
+ InitLogging(debug_log.value().c_str(),
+ logging::LOG_ONLY_TO_FILE,
+ logging::DONT_LOCK_LOG_FILE,
+ logging::APPEND_TO_OLD_LOG_FILE,
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+
const CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(kHelpSwitchName) ||
diff --git a/remoting/host/installer/chromoting.wxs b/remoting/host/installer/chromoting.wxs
index d07054b..f73a3d3 100644
--- a/remoting/host/installer/chromoting.wxs
+++ b/remoting/host/installer/chromoting.wxs
@@ -1,12 +1,19 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <?define ChromotingHost = "Chrome Remote Desktop Host" ?>
- <?define EventSourceName = "remoting_me2me_host" ?>
- <?define FirewallName = "remoting_me2me_host" ?>
- <?define Manufacturer = "Google Inc." ?>
+ <?define EventSourceName = "chromoting" ?>
<?define ServiceName = "chromoting" ?>
+ <?ifdef OfficialBuild ?>
+ <?define ChromotingHost = "Chrome Remote Desktop Host" ?>
+ <?define FirewallName = "Chrome Remote Desktop Host" ?>
+ <?define Manufacturer = "Google Inc." ?>
+ <?else?>
+ <?define ChromotingHost = "Chromoting Host" ?>
+ <?define FirewallName = "Chromoting Host" ?>
+ <?define Manufacturer = "The Chromium Authors" ?>
+ <?endif?>
+
<?define OmahaAppid = "{b210701e-ffc4-49e3-932b-370728c72662}" ?>
<?define UpgradeCode = "2b21f767-e157-4fa6-963c-55834c1433a6" ?>
@@ -51,7 +58,13 @@
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
- <Directory Id="chromoting" Name="Chrome Remote Desktop Host"/>
+ <?ifdef OfficialBuild ?>
+ <Directory Id="google" Name="Google">
+ <Directory Id="chromoting" Name="Chrome Remote Desktop"/>
+ </Directory>
+ <?else?>
+ <Directory Id="chromoting" Name="Chromoting"/>
+ <?endif?>
</Directory>
</Directory>
@@ -122,7 +135,7 @@
<RegistryKey Id="omaha_client_key"
Root="HKLM"
Key="SOFTWARE\Google\Update\Clients\$(var.OmahaAppid)"
- Action="createAndRemoveOnUninstall">
+ Action="create">
<RegistryValue Type="string"
Name="pv"
Value="$(var.Version)"/>
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 824e1cf..d5cd222 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -20,12 +20,12 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "base/path_service.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "crypto/nss_util.h"
#include "net/base/network_change_notifier.h"
#include "remoting/base/constants.h"
+#include "remoting/host/branding.h"
#include "remoting/host/capturer.h"
#include "remoting/host/chromoting_host.h"
#include "remoting/host/chromoting_host_context.h"
@@ -49,26 +49,13 @@
namespace {
// This is used for tagging system event logs.
-const char kApplicationName[] = "remoting_me2me_host";
+const char kApplicationName[] = "chromoting";
// These are used for parsing the config-file locations from the command line,
// and for defining the default locations if the switches are not present.
const char kAuthConfigSwitchName[] = "auth-config";
const char kHostConfigSwitchName[] = "host-config";
-// TODO(lambroslambrou): The default locations should depend on whether Chrome
-// branding is enabled - this means also modifying the Python daemon script.
-// The actual location of the files is ultimately determined by the service
-// daemon and NPAPI implementation - these defaults are only used in case the
-// command-line switches are absent.
-#if defined(OS_WIN) || defined(OS_MACOSX)
-const FilePath::CharType kDefaultConfigDir[] =
- FILE_PATH_LITERAL("Chrome Remote Desktop");
-#else
-const FilePath::CharType kDefaultConfigDir[] =
- FILE_PATH_LITERAL("chrome-remote-desktop");
-#endif
-
const FilePath::CharType kDefaultAuthConfigFile[] =
FILE_PATH_LITERAL("auth.json");
const FilePath::CharType kDefaultHostConfigFile[] =
@@ -77,21 +64,6 @@ const FilePath::CharType kDefaultHostConfigFile[] =
const int kMinPortNumber = 12400;
const int kMaxPortNumber = 12409;
-FilePath GetDefaultConfigDir() {
- FilePath default_config_dir;
-
-#if defined(OS_WIN)
- PathService::Get(base::DIR_LOCAL_APP_DATA, &default_config_dir);
-#elif defined(OS_MACOSX)
- PathService::Get(base::DIR_APP_DATA, &default_config_dir);
-#else
- default_config_dir = file_util::GetHomeDir().Append(FILE_PATH_LITERAL(
- ".config"));
-#endif
-
- return default_config_dir.Append(kDefaultConfigDir);
-}
-
} // namespace
namespace remoting {
@@ -114,7 +86,7 @@ class HostProcess : public OAuthClient::Delegate {
}
void InitWithCommandLine(const CommandLine* cmd_line) {
- FilePath default_config_dir = GetDefaultConfigDir();
+ FilePath default_config_dir = remoting::GetConfigDir();
if (cmd_line->HasSwitch(kAuthConfigSwitchName)) {
auth_config_path_ = cmd_line->GetSwitchValuePath(kAuthConfigSwitchName);
} else {
@@ -373,6 +345,17 @@ int main(int argc, char** argv) {
// LazyInstance, MessageLoop).
base::AtExitManager exit_manager;
+#if defined(OS_WIN)
+ // Write logs to the application profile directory.
+ FilePath debug_log = remoting::GetConfigDir().
+ Append(FILE_PATH_LITERAL("debug.log"));
+ InitLogging(debug_log.value().c_str(),
+ logging::LOG_ONLY_TO_FILE,
+ logging::DONT_LOCK_LOG_FILE,
+ logging::APPEND_TO_OLD_LOG_FILE,
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+#endif
+
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
#if defined(TOOLKIT_USES_GTK)
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index 6137323..77ce3fe 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -17,7 +17,7 @@
# binaries from Chrome.
'variables': {
'version_py_path': '../chrome/tools/build/version.py',
- 'version_path': '../chrome/VERSION',
+ 'version_path': '../remoting/VERSION',
},
'version_py_path': '<(version_py_path)',
'version_path': '<(version_path)',
@@ -268,6 +268,8 @@
],
'sources': [
'base/scoped_sc_handle_win.h',
+ 'host/branding.cc',
+ 'host/branding.h',
'host/chromoting_messages.cc',
'host/chromoting_messages.h',
'host/host_service.rc',
@@ -295,7 +297,7 @@
# The .RC files are generated from the "version.rc.version" template and
# placed in the "<(SHARED_INTERMEDIATE_DIR)/remoting_version" folder.
# The substiture strings are taken from:
- # - chrome/VERSION - the current version of Chrome.
+ # - remoting/VERSION - the current version of Chromoting.
# - build/util/LASTCHANGE - the last source code revision.
# - xxx_branding - UI/localizable strings.
# - xxx.ver - per-binary non-localizable strings such as the binary
@@ -306,6 +308,13 @@
'dependencies': [
'../build/util/build_util.gyp:lastchange#target',
],
+ 'inputs': [
+ 'chromium_branding',
+ 'google_chrome_branding',
+ 'version.rc.version',
+ '<(DEPTH)/build/util/LASTCHANGE',
+ '<(version_path)',
+ ],
'direct_dependent_settings': {
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/remoting_version',
@@ -385,6 +394,17 @@
'variables': {
'sas_dll_path': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86/sas.dll'
},
+ 'conditions': [
+ ['branding == "Chrome"', {
+ 'variables': {
+ 'branding': '-dOfficialBuild=1',
+ },
+ }, { # else branding!="Chrome"
+ 'variables': {
+ 'branding': '',
+ },
+ }],
+ ],
'rules': [
{
'rule_name': 'candle',
@@ -404,6 +424,7 @@
'-dVersion=<(version_full) '
'"-dFileSource=<(PRODUCT_DIR)." '
'"-dSasDllPath=<(sas_dll_path)" '
+ '<(branding) '
'-out <@(_outputs)',
'"<(RULE_INPUT_PATH)"',
],
@@ -432,6 +453,7 @@
'-dVersion=<(version_full) '
'"-dFileSource=<(PRODUCT_DIR)." '
'"-dSasDllPath=<(sas_dll_path)" '
+ '<(branding) '
'-out "<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi"',
'"<(RULE_INPUT_PATH)"',
],
@@ -939,6 +961,8 @@
'../content/content.gyp:content_common',
],
'sources': [
+ 'host/branding.cc',
+ 'host/branding.h',
'host/host_event_logger.h',
'host/remoting_me2me_host.cc',
],
diff --git a/remoting/version.rc.version b/remoting/version.rc.version
index d61841f..8a90ed0 100644
--- a/remoting/version.rc.version
+++ b/remoting/version.rc.version
@@ -17,16 +17,12 @@
#if (BINARY == BINARY_HOST_PLUGIN)
#define FILE_DESCRIPTION "@HOST_PLUGIN_FILE_DESCRIPTION@"
-#define PRODUCT_FULLNAME "@HOST_PLUGIN_PRODUCT_FULLNAME@"
#elif (BINARY == BINARY_ME2ME_HOST)
#define FILE_DESCRIPTION "@ME2ME_HOST_FILE_DESCRIPTION@"
-#define PRODUCT_FULLNAME "@ME2ME_HOST_PRODUCT_FULLNAME@"
#elif (BINARY == BINARY_SERVICE)
#define FILE_DESCRIPTION "@SERVICE_FILE_DESCRIPTION@"
-#define PRODUCT_FULLNAME "@SERVICE_PRODUCT_FULLNAME@"
#elif (BINARY == BINARY_SERVICE_CONTROLLER)
#define FILE_DESCRIPTION "@SERVICE_CONTROLLER_FILE_DESCRIPTION@"
-#define PRODUCT_FULLNAME "@SERVICE_CONTROLLER_PRODUCT_FULLNAME@"
#endif
VS_VERSION_INFO VERSIONINFO
@@ -52,7 +48,7 @@ BEGIN
VALUE "InternalName", "@INTERNAL_NAME@"
VALUE "LegalCopyright", "@COPYRIGHT@"
VALUE "OriginalFilename", "@ORIGINAL_FILENAME@"
- VALUE "ProductName", PRODUCT_FULLNAME
+ VALUE "ProductName", "@PRODUCT_FULLNAME@"
VALUE "ProductVersion", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@"
VALUE "LastChange", "@LASTCHANGE@"
VALUE "Official Build", "@OFFICIAL_BUILD@"