summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 00:17:18 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 00:17:18 +0000
commitfe5195f111c94ba3ebe33719463ba24f6c5930e0 (patch)
treedb0642a1481a12d86546d6856d08fbada58bc064 /remoting
parent801f2616736e7f565c0fc72bb71be02e9bbfba66 (diff)
downloadchromium_src-fe5195f111c94ba3ebe33719463ba24f6c5930e0.zip
chromium_src-fe5195f111c94ba3ebe33719463ba24f6c5930e0.tar.gz
chromium_src-fe5195f111c94ba3ebe33719463ba24f6c5930e0.tar.bz2
Avoid potential conflicts leading to pending reboots while upgrading the me2me host:
- Install the host binaries to versioned folders. - Drop references to the COM objects quickly. BUG=137755 Review URL: https://chromiumcodereview.appspot.com/10831037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/installer/chromoting.wxs8
-rw-r--r--remoting/host/plugin/daemon_controller_win.cc22
2 files changed, 25 insertions, 5 deletions
diff --git a/remoting/host/installer/chromoting.wxs b/remoting/host/installer/chromoting.wxs
index 60a0d37..5f957a6 100644
--- a/remoting/host/installer/chromoting.wxs
+++ b/remoting/host/installer/chromoting.wxs
@@ -90,10 +90,14 @@
<Directory Id="ProgramFilesFolder">
<?ifdef OfficialBuild ?>
<Directory Id="program_files_google" Name="Google">
- <Directory Id="binaries" Name="Chrome Remote Desktop"/>
+ <Directory Id="chromoting" Name="Chrome Remote Desktop">
+ <Directory Id="binaries" Name="$(var.Version)"/>
+ </Directory>
</Directory>
<?else?>
- <Directory Id="binaries" Name="Chromoting"/>
+ <Directory Id="chromoting" Name="Chromoting">
+ <Directory Id="binaries" Name="$(var.Version)"/>
+ </Directory>
<?endif?>
</Directory>
<Directory Id="CommonAppDataFolder">
diff --git a/remoting/host/plugin/daemon_controller_win.cc b/remoting/host/plugin/daemon_controller_win.cc
index 2d8082c..2985652 100644
--- a/remoting/host/plugin/daemon_controller_win.cc
+++ b/remoting/host/plugin/daemon_controller_win.cc
@@ -51,8 +51,17 @@ const wchar_t kDaemonControllerElevationMoniker[] =
// Name of the Daemon Controller's worker thread.
const char kDaemonControllerThreadName[] = "Daemon Controller thread";
-// The maximum interval between showing UAC prompts.
-const int kUacTimeoutSec = 15 * 60;
+// The maximum duration of keeping a reference to a privileged instance of
+// the Daemon Controller. This effectively reduces number of UAC prompts a user
+// sees.
+const int kPrivilegedTimeoutSec = 5 * 60;
+
+// The maximum duration of keeping a reference to an unprivileged instance of
+// the Daemon Controller. This interval should not be too long. If upgrade
+// happens while there is a live reference to a Daemon Controller instance
+// the old binary still can be used. So dropping the references often makes sure
+// that the old binary will go away sooner.
+const int kUnprivilegedTimeoutSec = 60;
// A base::Thread implementation that initializes COM on the new thread.
class ComThread : public base::Thread {
@@ -296,6 +305,13 @@ HRESULT DaemonControllerWin::ActivateController() {
// Ignore the error. IID_IDaemonControl2 is optional.
control_.QueryInterface(IID_IDaemonControl2, control2_.ReceiveVoid());
+
+ // Release |control_| upon expiration of the timeout.
+ release_timer_.reset(new base::OneShotTimer<DaemonControllerWin>());
+ release_timer_->Start(FROM_HERE,
+ base::TimeDelta::FromSeconds(kUnprivilegedTimeoutSec),
+ this,
+ &DaemonControllerWin::ReleaseController);
}
return S_OK;
@@ -339,7 +355,7 @@ HRESULT DaemonControllerWin::ActivateElevatedController() {
// Release |control_| upon expiration of the timeout.
release_timer_.reset(new base::OneShotTimer<DaemonControllerWin>());
release_timer_->Start(FROM_HERE,
- base::TimeDelta::FromSeconds(kUacTimeoutSec),
+ base::TimeDelta::FromSeconds(kPrivilegedTimeoutSec),
this,
&DaemonControllerWin::ReleaseController);
}