summaryrefslogtreecommitdiffstats
path: root/remoting/host/plugin
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 05:09:25 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 05:09:25 +0000
commit70ebae40787a60037db0411bf62f747dc71c464a (patch)
treeb6fcdcf7e0e62494c10d0bf413d43b6849d1f118 /remoting/host/plugin
parent399c3f96081fc2922c646d34c1bc7e1a1742da06 (diff)
downloadchromium_src-70ebae40787a60037db0411bf62f747dc71c464a.zip
chromium_src-70ebae40787a60037db0411bf62f747dc71c464a.tar.gz
chromium_src-70ebae40787a60037db0411bf62f747dc71c464a.tar.bz2
C++ readability review fixes for r141239: Make Chromoting Host report crashes to Breakpad (Windows only).
BUG=130678 TEST=remoting_unittests.BreakpadWinDeathTest Review URL: https://chromiumcodereview.appspot.com/10535082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/plugin')
-rw-r--r--remoting/host/plugin/daemon_installer_win.cc44
1 files changed, 18 insertions, 26 deletions
diff --git a/remoting/host/plugin/daemon_installer_win.cc b/remoting/host/plugin/daemon_installer_win.cc
index a78420b..3ebd2ca 100644
--- a/remoting/host/plugin/daemon_installer_win.cc
+++ b/remoting/host/plugin/daemon_installer_win.cc
@@ -20,12 +20,8 @@
#include "base/win/scoped_comptr.h"
#include "base/win/scoped_handle.h"
#include "base/win/scoped_variant.h"
-#include "remoting/base/dispatch_win.h"
-
-namespace omaha {
#include "google_update/google_update_idl.h"
-} // namespace omaha
-
+#include "remoting/base/dispatch_win.h"
#include "remoting/host/constants.h"
using base::win::ScopedBstr;
@@ -195,10 +191,6 @@ void DaemonComInstallerWin::PollInstallationStatus() {
ScopedVariant state;
hr = dispatch::Invoke(V_DISPATCH(&current_state), L"stateValue",
DISPATCH_PROPERTYGET, state.Receive());
- if (FAILED(hr)) {
- Done(hr);
- return;
- }
if (state.type() != VT_I4) {
Done(DISP_E_TYPEMISMATCH);
return;
@@ -206,18 +198,18 @@ void DaemonComInstallerWin::PollInstallationStatus() {
// Perform state-specific actions.
switch (V_I4(&state)) {
- case omaha::STATE_INIT:
- case omaha::STATE_WAITING_TO_CHECK_FOR_UPDATE:
- case omaha::STATE_CHECKING_FOR_UPDATE:
- case omaha::STATE_WAITING_TO_DOWNLOAD:
- case omaha::STATE_RETRYING_DOWNLOAD:
- case omaha::STATE_DOWNLOADING:
- case omaha::STATE_WAITING_TO_INSTALL:
- case omaha::STATE_INSTALLING:
- case omaha::STATE_PAUSED:
+ case STATE_INIT:
+ case STATE_WAITING_TO_CHECK_FOR_UPDATE:
+ case STATE_CHECKING_FOR_UPDATE:
+ case STATE_WAITING_TO_DOWNLOAD:
+ case STATE_RETRYING_DOWNLOAD:
+ case STATE_DOWNLOADING:
+ case STATE_WAITING_TO_INSTALL:
+ case STATE_INSTALLING:
+ case STATE_PAUSED:
break;
- case omaha::STATE_UPDATE_AVAILABLE:
+ case STATE_UPDATE_AVAILABLE:
hr = dispatch::Invoke(V_DISPATCH(&bundle_), L"download",
DISPATCH_METHOD, NULL);
if (FAILED(hr)) {
@@ -226,10 +218,10 @@ void DaemonComInstallerWin::PollInstallationStatus() {
}
break;
- case omaha::STATE_DOWNLOAD_COMPLETE:
- case omaha::STATE_EXTRACTING:
- case omaha::STATE_APPLYING_DIFFERENTIAL_PATCH:
- case omaha::STATE_READY_TO_INSTALL:
+ case STATE_DOWNLOAD_COMPLETE:
+ case STATE_EXTRACTING:
+ case STATE_APPLYING_DIFFERENTIAL_PATCH:
+ case STATE_READY_TO_INSTALL:
hr = dispatch::Invoke(V_DISPATCH(&bundle_), L"install",
DISPATCH_METHOD, NULL);
if (FAILED(hr)) {
@@ -238,13 +230,13 @@ void DaemonComInstallerWin::PollInstallationStatus() {
}
break;
- case omaha::STATE_INSTALL_COMPLETE:
- case omaha::STATE_NO_UPDATE:
+ case STATE_INSTALL_COMPLETE:
+ case STATE_NO_UPDATE:
// Installation complete or not required. Report success.
Done(S_OK);
return;
- case omaha::STATE_ERROR: {
+ case STATE_ERROR: {
ScopedVariant error_code;
hr = dispatch::Invoke(V_DISPATCH(&current_state), L"errorCode",
DISPATCH_PROPERTYGET, error_code.Receive());