Commit 9a18ecfa authored by Findit's avatar Findit

Revert "Split the updater IDL file."

This reverts commit 3846b220.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 827420 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzM4NDZiMjIwMzIxYTRlYTM3MWJiNmE0NGUzYTEyN2NmNjllZTUyNDEM

Sample Failed Build: https://ci.chromium.org/b/8863709088659159040

Sample Failed Step: compile

Original change's description:
> Split the updater IDL file.
> 
> The IDL file is split in three parts: public, internal, and legacy
> definitions.
> 
> This is a fairly straightforward change, which consists of suffixing
> the path to the typelib in the executable file with a //<index> where
> the index matches one of the there source IDLs above.
> 
> Further work is needed to properly generate the GUIDs depending on
> the which IDL the GUIDs belong to. Some of the GUIDs must depend on
> branding, and some of the GUIDs must depend on branding and version.
> 
> 
> Bug: 1140562
> Change-Id: I6030977d3961ff24bbc8bc33392415d59884feec
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2527822
> Reviewed-by: S. Ganesh <ganesh@chromium.org>
> Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
> Commit-Queue: Sorin Jianu <sorin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#827420}


Change-Id: I3821d3b2bb496016035c7192a1d3c3c7eb672e63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1140562
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537122
Cr-Commit-Position: refs/heads/master@{#827460}
parent e433d47a
...@@ -187,8 +187,6 @@ if (is_win || is_mac) { ...@@ -187,8 +187,6 @@ if (is_win || is_mac) {
if (is_win) { if (is_win) {
deps += [ deps += [
"//chrome/updater/app/server/win:updater_idl_idl", "//chrome/updater/app/server/win:updater_idl_idl",
"//chrome/updater/app/server/win:updater_internal_idl_idl",
"//chrome/updater/app/server/win:updater_legacy_idl_idl",
"//chrome/updater/win:constants", "//chrome/updater/win:constants",
"//chrome/updater/win:lib", "//chrome/updater/win:lib",
] ]
...@@ -338,9 +336,6 @@ if (is_win || is_mac) { ...@@ -338,9 +336,6 @@ if (is_win || is_mac) {
] ]
deps += [ deps += [
"//chrome/updater/app/server/win:updater_idl_idl",
"//chrome/updater/app/server/win:updater_internal_idl_idl",
"//chrome/updater/app/server/win:updater_legacy_idl_idl",
"//chrome/updater/win:constants", "//chrome/updater/win:constants",
"//chrome/updater/win:lib", "//chrome/updater/win:lib",
"//chrome/updater/win:updater_tests", "//chrome/updater/win:updater_tests",
......
...@@ -6,7 +6,6 @@ import("//build/toolchain/win/midl.gni") ...@@ -6,7 +6,6 @@ import("//build/toolchain/win/midl.gni")
import("//build/util/version.gni") import("//build/util/version.gni")
import("//chrome/updater/branding.gni") import("//chrome/updater/branding.gni")
# TODO(crbug.com/1109612): these GUIDs must depend on branding only.
placeholder_guids = [ placeholder_guids = [
"PLACEHOLDER-GUID-69464FF0-D9EC-4037-A35F-8AE4358106CC", # UpdaterLib "PLACEHOLDER-GUID-69464FF0-D9EC-4037-A35F-8AE4358106CC", # UpdaterLib
"PLACEHOLDER-GUID-158428a4-6014-4978-83ba-9fad0dabe791", # UpdaterClass "PLACEHOLDER-GUID-158428a4-6014-4978-83ba-9fad0dabe791", # UpdaterClass
...@@ -14,6 +13,8 @@ placeholder_guids = [ ...@@ -14,6 +13,8 @@ placeholder_guids = [
"PLACEHOLDER-GUID-46ACF70B-AC13-406D-B53B-B2C4BF091FF6", # IUpdateState "PLACEHOLDER-GUID-46ACF70B-AC13-406D-B53B-B2C4BF091FF6", # IUpdateState
"PLACEHOLDER-GUID-2FCD14AF-B645-4351-8359-E80A0E202A0B", # ICompleteStatus "PLACEHOLDER-GUID-2FCD14AF-B645-4351-8359-E80A0E202A0B", # ICompleteStatus
"PLACEHOLDER-GUID-7B416CFD-4216-4FD6-BD83-7C586054676E", # IUpdaterObserver "PLACEHOLDER-GUID-7B416CFD-4216-4FD6-BD83-7C586054676E", # IUpdaterObserver
"PLACEHOLDER-GUID-526DA036-9BD3-4697-865A-DA12D37DFFCA", # IUpdaterControl
"PLACEHOLDER-GUID-D272C794-2ACE-4584-B993-3B90C622BE65", # IUpdaterControlCallback
] ]
uuid5_guids = [] uuid5_guids = []
...@@ -29,30 +30,7 @@ midl("updater_idl_idl") { ...@@ -29,30 +30,7 @@ midl("updater_idl_idl") {
header_file = "updater_idl.h" header_file = "updater_idl.h"
sources = [ "updater_idl.template" ] sources = [ "updater_idl.template" ]
writes_tlb = true
}
midl("updater_internal_idl_idl") {
header_file = "updater_internal_idl.h"
sources = [ "updater_internal_idl.template" ]
# TODO(crbug.com/1109612): these GUIDs must depend on branding and version.
defines = [
"IUPDATERCONTROL_IID=526DA036-9BD3-4697-865A-DA12D37DFFCA",
"IUPDATERCONTROLCALLBACK_IID=D272C794-2ACE-4584-B993-3B90C622BE65",
"UPDATER_INTERNAL_LIB_UUID=C6CE92DB-72CA-42EF-8C98-6EE92481B3C9",
]
writes_tlb = true
}
midl("updater_legacy_idl_idl") {
header_file = "updater_legacy_idl.h"
sources = [ "updater_legacy_idl.template" ]
# These are the Omaha GUIDs for on-demand API.
defines = [ defines = [
"UPDATER_LEGACY_LIB_UUID=69464FF0-D9EC-4037-A35F-8AE4358106CC",
"ICURRENTSTATE_IID=247954F9-9EDC-4E68-8CC3-150C2B89EADF", "ICURRENTSTATE_IID=247954F9-9EDC-4E68-8CC3-150C2B89EADF",
"IGOOGLEUPDATE3WEB_IID=494B20CF-282E-4BDD-9F5D-B70CB09D351E", "IGOOGLEUPDATE3WEB_IID=494B20CF-282E-4BDD-9F5D-B70CB09D351E",
"IAPPBUNDLEWEB_IID=DD42475D-6D46-496a-924E-BD5630B4CBBA", "IAPPBUNDLEWEB_IID=DD42475D-6D46-496a-924E-BD5630B4CBBA",
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "chrome/updater/app/server/win/updater_idl.h" #include "chrome/updater/app/server/win/updater_idl.h"
#include "chrome/updater/app/server/win/updater_internal_idl.h"
#include "chrome/updater/update_service.h" #include "chrome/updater/update_service.h"
// Definitions for native COM updater classes. // Definitions for native COM updater classes.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "base/optional.h" #include "base/optional.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "chrome/updater/app/server/win/updater_legacy_idl.h" #include "chrome/updater/app/server/win/updater_idl.h"
#include "chrome/updater/update_service.h" #include "chrome/updater/update_service.h"
namespace base { namespace base {
......
...@@ -113,8 +113,8 @@ HRESULT ComServerApp::RegisterClassObjects() { ...@@ -113,8 +113,8 @@ HRESULT ComServerApp::RegisterClassObjects() {
std::extent<decltype(cookies_)>() == base::size(class_factories), std::extent<decltype(cookies_)>() == base::size(class_factories),
"Arrays cookies_ and class_factories must be the same size."); "Arrays cookies_ and class_factories must be the same size.");
IID class_ids[] = {__uuidof(UpdaterClass), __uuidof(UpdaterControlClass), IID class_ids[] = {__uuidof(UpdaterClass), CLSID_UpdaterControlClass,
__uuidof(GoogleUpdate3WebUserClass)}; CLSID_GoogleUpdate3WebUserClass};
DCHECK_EQ(base::size(cookies_), base::size(class_ids)); DCHECK_EQ(base::size(cookies_), base::size(class_ids));
static_assert(std::extent<decltype(cookies_)>() == base::size(class_ids), static_assert(std::extent<decltype(cookies_)>() == base::size(class_ids),
"Arrays cookies_ and class_ids must be the same size."); "Arrays cookies_ and class_ids must be the same size.");
......
...@@ -5,10 +5,238 @@ ...@@ -5,10 +5,238 @@
import "oaidl.idl"; import "oaidl.idl";
import "ocidl.idl"; import "ocidl.idl";
// The following are copied from omaha3_idl.idl:
// enum CurrentState.
// interface ICurrentState.
// interface IGoogleUpdate3Web.
// interface IAppBundleWeb.
// interface IAppWeb.
// coclass GoogleUpdate3WebUserClass.
// Public interfaces for the Chromium Updater. // The normal install flow proceeds from STATE_INIT through
// For documentation, see the similar types defined in updater::UpdateService. // STATE_INSTALL_COMPLETE in order, skipping states that are not relevant.
// All exceptions and terminal states are start with STATE_INSTALL_COMPLETE.
typedef enum CurrentState {
STATE_INIT = 1,
STATE_WAITING_TO_CHECK_FOR_UPDATE = 2,
STATE_CHECKING_FOR_UPDATE = 3,
STATE_UPDATE_AVAILABLE = 4,
STATE_WAITING_TO_DOWNLOAD = 5,
STATE_RETRYING_DOWNLOAD = 6,
STATE_DOWNLOADING = 7,
STATE_DOWNLOAD_COMPLETE = 8,
STATE_EXTRACTING = 9,
STATE_APPLYING_DIFFERENTIAL_PATCH = 10,
// TODO(omaha3): Should we move STATE_DOWNLOAD_COMPLETE here and eliminate
// STATE_READY_TO_INSTALL?
STATE_READY_TO_INSTALL = 11,
STATE_WAITING_TO_INSTALL = 12,
STATE_INSTALLING = 13,
STATE_INSTALL_COMPLETE = 14,
STATE_PAUSED = 15,
STATE_NO_UPDATE = 16,
STATE_ERROR = 17,
} CurrentState;
[
object,
dual,
uuid(ICURRENTSTATE_IID),
helpstring("ICurrentState Interface"),
pointer_default(unique)
]
interface ICurrentState : IDispatch {
// This interface is exposed to web clients!
// TODO(omaha3): Update valid comments once we settle on an implementation.
// A value from the CurrentState enum. This value determines which of the
// properties below are valid.
[propget] HRESULT stateValue([out, retval] LONG*);
// The remaining properties are only valid in the specified states. For all
// other states, the values are not specified.
// This property is valid only when stateValue is STATE_UPDATE_AVAILABLE.
[propget] HRESULT availableVersion([out, retval] BSTR*);
// The following three properties are only valid when stateValue is
// STATE_WAITING_TO_DOWNLOAD, STATE_RETRYING_DOWNLOAD, STATE_DOWNLOADING,
// STATE_DOWNLOAD_COMPLETE, STATE_EXTRACTING,
// STATE_APPLYING_DIFFERENTIAL_PATCH, or STATE_READY_TO_INSTALL.
// Bytes downloaded so far.
[propget] HRESULT bytesDownloaded([out, retval] ULONG*);
// Total bytes to download.
[propget] HRESULT totalBytesToDownload([out, retval] ULONG*);
// Estimated download time remaining in ms. -1 indicates unknown.
// Progress may not always be available, so clients should handle the -1 case.
[propget] HRESULT downloadTimeRemainingMs([out, retval] LONG*);
[propget] HRESULT nextRetryTime([out, retval] ULONGLONG*);
// TODO(omaha 3): Need some way to indicate reconnecting, retrying, etc.
// The following two properties are only valid when stateValue is
// STATE_INSTALLING or STATE_INSTALL_COMPLETE.
// Current install progress in percentage from 0 to 100. -1 indicates unknown.
// Progress may not always be available, so clients should handle the -1 case.
[propget] HRESULT installProgress([out, retval] LONG*);
// Estimated download time remaining in ms. -1 indicates unknown.
// Progress may not always be available, so clients should handle the -1 case.
[propget] HRESULT installTimeRemainingMs([out, retval] LONG*);
// The following four properties are only valid when stateValue is
// STATE_ERROR:
// Returns true if the app has been canceled.
[propget] HRESULT isCanceled([out, retval] VARIANT_BOOL* is_canceled);
// Error code.
[propget] HRESULT errorCode([out, retval] LONG*);
// Error extra code.
[propget] HRESULT extraCode1([out, retval] LONG*);
// The following three properties are only valid when stateValue is
// STATE_ERROR or STATE_INSTALL_COMPLETE.
// TODO(omaha3): If STATE_DOWNLOAD_COMPLETE or STATE_READY_TO_INSTALL becomes
// a terminal state, does it support completion messages?
// Completion message, localized in the specified language.
// TODO(omaha3): If we're going to have bundle error messages too, should the
// language be at bundle level? Should bundle have its own language setter?
[propget] HRESULT completionMessage([out, retval] BSTR*);
// Application installer result code. This is to be used as additional
// information only. Success/failure should be determined using errorCode.
// This is an error if errorCode is GOOPDATEINSTALL_E_INSTALLER_FAILED.
[propget] HRESULT installerResultCode([out, retval] LONG*);
// Application installer extra code.
[propget] HRESULT installerResultExtraCode1([out, retval] LONG*);
// A command that needs to be launched by the client after installation.
[propget] HRESULT postInstallLaunchCommandLine([out, retval] BSTR*);
// URL to be launched after restarting the browser.
[propget] HRESULT postInstallUrl([out, retval] BSTR*);
// Returns a PostInstallAction value indicating the action to be taken by the
// client after installation.
[propget] HRESULT postInstallAction([out, retval] LONG*);
}
[
object,
dual,
uuid(IGOOGLEUPDATE3WEB_IID),
helpstring("IGoogleUpdate3Web Interface"),
pointer_default(unique)
]
interface IGoogleUpdate3Web : IDispatch {
HRESULT createAppBundleWeb([out, retval] IDispatch** app_bundle_web);
};
[
object,
dual,
uuid(IAPPBUNDLEWEB_IID),
helpstring("IAppBundleWeb Interface"),
pointer_default(unique)
]
interface IAppBundleWeb : IDispatch {
[id(2)] HRESULT createApp([in] BSTR app_guid,
[in] BSTR brand_code,
[in] BSTR language,
[in] BSTR ap);
[id(3)] HRESULT createInstalledApp([in] BSTR app_id);
[id(4)] HRESULT createAllInstalledApps();
[propget] HRESULT displayLanguage([out, retval] BSTR*);
[propput] HRESULT displayLanguage([in] BSTR);
[propput] HRESULT parentHWND([in] ULONG_PTR hwnd);
[propget] HRESULT length([out, retval] int* index);
[id(DISPID_VALUE), propget] HRESULT appWeb(
[in] int index, [out, retval] IDispatch** app_web);
HRESULT initialize();
HRESULT checkForUpdate();
HRESULT download();
HRESULT install();
HRESULT pause();
HRESULT resume();
HRESULT cancel();
HRESULT downloadPackage([in] BSTR app_id, [in] BSTR package_name);
[propget] HRESULT currentState([out, retval] VARIANT* current_state);
};
[
object,
dual,
uuid(IAPPWEB_IID),
helpstring("IAppWeb Interface"),
pointer_default(unique)
]
interface IAppWeb : IDispatch {
[propget] HRESULT appId([out, retval] BSTR*);
// Returns an IAppVersionWeb IDispatch object.
[propget] HRESULT currentVersionWeb([out, retval] IDispatch** current);
[propget] HRESULT nextVersionWeb([out, retval] IDispatch** next);
// Returns an IAppCommandWeb IDispatch object, or NULL.
[propget] HRESULT command([in] BSTR command_id,
[out, retval] IDispatch** command);
HRESULT cancel();
[propget] HRESULT currentState([out, retval] IDispatch** current_state);
HRESULT launch();
HRESULT uninstall();
[propget] HRESULT serverInstallDataIndex([out, retval] BSTR*);
[propput] HRESULT serverInstallDataIndex([in] BSTR);
};
// The new interface definitions. For documentation, see the similar
// types defined in updater::UpdateService or updater::ControlService.
// UpdaterControl objects.
[
object,
dual,
uuid(PLACEHOLDER-GUID-D272C794-2ACE-4584-B993-3B90C622BE65),
helpstring("IUpdaterControlCallback Interface"),
pointer_default(unique)
]
interface IUpdaterControlCallback : IUnknown {
HRESULT Run([in] LONG result);
};
[
object,
dual,
uuid(PLACEHOLDER-GUID-526DA036-9BD3-4697-865A-DA12D37DFFCA),
helpstring("IUpdaterControl Interface"),
pointer_default(unique)
]
interface IUpdaterControl : IUnknown {
HRESULT Run([in] IUpdaterControlCallback* callback);
HRESULT InitializeUpdateService([in] IUpdaterControlCallback* callback);
};
// Updater objects.
[ [
object, object,
dual, dual,
...@@ -75,11 +303,15 @@ interface IUpdater : IUnknown { ...@@ -75,11 +303,15 @@ interface IUpdater : IUnknown {
[ [
uuid(PLACEHOLDER-GUID-69464FF0-D9EC-4037-A35F-8AE4358106CC), uuid(PLACEHOLDER-GUID-69464FF0-D9EC-4037-A35F-8AE4358106CC),
version(1.0), version(1.0),
helpstring("Chromium Updater type library") helpstring("Omaha 4.0 Type Library")
] ]
library UpdaterLib { library UpdaterLib {
importlib("stdole2.tlb"); importlib("stdole2.tlb");
// The 'coclass' definition needs to be first when using the 'dynamic_guid'
// feature in midl.gni. Also, the 'dynamic_guid' feature only allows for a
// single 'coclass' definition. Any other coclasses need to be defined in
// constants.h/cc.
[ [
uuid(PLACEHOLDER-GUID-158428a4-6014-4978-83ba-9fad0dabe791), uuid(PLACEHOLDER-GUID-158428a4-6014-4978-83ba-9fad0dabe791),
helpstring("Updater Class") helpstring("Updater Class")
...@@ -89,17 +321,11 @@ library UpdaterLib { ...@@ -89,17 +321,11 @@ library UpdaterLib {
[default] interface IUnknown; [default] interface IUnknown;
} }
[
uuid(415FD747-D79E-42D7-93AC-1BA6E5FD4E93),
helpstring("UpdaterService Class")
]
coclass UpdaterServiceClass
{
[default] interface IUnknown;
}
interface ICompleteStatus;
interface IUpdater; interface IUpdater;
interface IUpdaterObserver; interface IUpdaterControl;
interface IUpdateState;
interface ICurrentState;
interface IGoogleUpdate3Web;
interface IAppBundleWeb;
interface IAppWeb;
}; };
// Copyright 2020 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.
import "oaidl.idl";
import "ocidl.idl";
// Private interfaces for the Chromium Updater.
// For documentation, see the similar types defined in updater::ControlService.
[
object,
dual,
uuid(IUPDATERCONTROLCALLBACK_IID),
helpstring("IUpdaterControlCallback Interface"),
pointer_default(unique)
]
interface IUpdaterControlCallback : IUnknown {
HRESULT Run([in] LONG result);
};
[
object,
dual,
uuid(IUPDATERCONTROL_IID),
helpstring("IUpdaterControl Interface"),
pointer_default(unique)
]
interface IUpdaterControl : IUnknown {
HRESULT Run([in] IUpdaterControlCallback* callback);
HRESULT InitializeUpdateService([in] IUpdaterControlCallback* callback);
};
[
uuid(UPDATER_INTERNAL_LIB_UUID),
version(1.0),
helpstring("Chromium Updater internal type library.")
]
library UpdaterInternalLib {
importlib("stdole2.tlb");
[
uuid(1F87FE2F-D6A9-4711-9D11-8187705F8457),
helpstring("UpdaterControl Class")
]
coclass UpdaterControlClass
{
[default] interface IUnknown;
}
interface IUpdaterControl;
interface IUpdaterControlCallback;
};
// Copyright 2020 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.
import "oaidl.idl";
import "ocidl.idl";
// Backward-compatible, Omaha public interfaces.
// The following are copied from omaha3_idl.idl:
// enum CurrentState.
// interface ICurrentState.
// interface IGoogleUpdate3Web.
// interface IAppBundleWeb.
// interface IAppWeb.
// coclass GoogleUpdate3WebUserClass.
// The normal install flow proceeds from STATE_INIT through
// STATE_INSTALL_COMPLETE in order, skipping states that are not relevant.
// All exceptions and terminal states are start with STATE_INSTALL_COMPLETE.
typedef enum CurrentState {
STATE_INIT = 1,
STATE_WAITING_TO_CHECK_FOR_UPDATE = 2,
STATE_CHECKING_FOR_UPDATE = 3,
STATE_UPDATE_AVAILABLE = 4,
STATE_WAITING_TO_DOWNLOAD = 5,
STATE_RETRYING_DOWNLOAD = 6,
STATE_DOWNLOADING = 7,
STATE_DOWNLOAD_COMPLETE = 8,
STATE_EXTRACTING = 9,
STATE_APPLYING_DIFFERENTIAL_PATCH = 10,
// TODO(omaha3): Should we move STATE_DOWNLOAD_COMPLETE here and eliminate
// STATE_READY_TO_INSTALL?
STATE_READY_TO_INSTALL = 11,
STATE_WAITING_TO_INSTALL = 12,
STATE_INSTALLING = 13,
STATE_INSTALL_COMPLETE = 14,
STATE_PAUSED = 15,
STATE_NO_UPDATE = 16,
STATE_ERROR = 17,
} CurrentState;
[
object,
dual,
uuid(ICURRENTSTATE_IID),
helpstring("ICurrentState Interface"),
pointer_default(unique)
]
interface ICurrentState : IDispatch {
// This interface is exposed to web clients!
// TODO(omaha3): Update valid comments once we settle on an implementation.
// A value from the CurrentState enum. This value determines which of the
// properties below are valid.
[propget] HRESULT stateValue([out, retval] LONG*);
// The remaining properties are only valid in the specified states. For all
// other states, the values are not specified.
// This property is valid only when stateValue is STATE_UPDATE_AVAILABLE.
[propget] HRESULT availableVersion([out, retval] BSTR*);
// The following three properties are only valid when stateValue is
// STATE_WAITING_TO_DOWNLOAD, STATE_RETRYING_DOWNLOAD, STATE_DOWNLOADING,
// STATE_DOWNLOAD_COMPLETE, STATE_EXTRACTING,
// STATE_APPLYING_DIFFERENTIAL_PATCH, or STATE_READY_TO_INSTALL.
// Bytes downloaded so far.
[propget] HRESULT bytesDownloaded([out, retval] ULONG*);
// Total bytes to download.
[propget] HRESULT totalBytesToDownload([out, retval] ULONG*);
// Estimated download time remaining in ms. -1 indicates unknown.
// Progress may not always be available, so clients should handle the -1 case.
[propget] HRESULT downloadTimeRemainingMs([out, retval] LONG*);
[propget] HRESULT nextRetryTime([out, retval] ULONGLONG*);
// TODO(omaha 3): Need some way to indicate reconnecting, retrying, etc.
// The following two properties are only valid when stateValue is
// STATE_INSTALLING or STATE_INSTALL_COMPLETE.
// Current install progress in percentage from 0 to 100. -1 indicates unknown.
// Progress may not always be available, so clients should handle the -1 case.
[propget] HRESULT installProgress([out, retval] LONG*);
// Estimated download time remaining in ms. -1 indicates unknown.
// Progress may not always be available, so clients should handle the -1 case.
[propget] HRESULT installTimeRemainingMs([out, retval] LONG*);
// The following four properties are only valid when stateValue is
// STATE_ERROR:
// Returns true if the app has been canceled.
[propget] HRESULT isCanceled([out, retval] VARIANT_BOOL* is_canceled);
// Error code.
[propget] HRESULT errorCode([out, retval] LONG*);
// Error extra code.
[propget] HRESULT extraCode1([out, retval] LONG*);
// The following three properties are only valid when stateValue is
// STATE_ERROR or STATE_INSTALL_COMPLETE.
// TODO(omaha3): If STATE_DOWNLOAD_COMPLETE or STATE_READY_TO_INSTALL becomes
// a terminal state, does it support completion messages?
// Completion message, localized in the specified language.
// TODO(omaha3): If we're going to have bundle error messages too, should the
// language be at bundle level? Should bundle have its own language setter?
[propget] HRESULT completionMessage([out, retval] BSTR*);
// Application installer result code. This is to be used as additional
// information only. Success/failure should be determined using errorCode.
// This is an error if errorCode is GOOPDATEINSTALL_E_INSTALLER_FAILED.
[propget] HRESULT installerResultCode([out, retval] LONG*);
// Application installer extra code.
[propget] HRESULT installerResultExtraCode1([out, retval] LONG*);
// A command that needs to be launched by the client after installation.
[propget] HRESULT postInstallLaunchCommandLine([out, retval] BSTR*);
// URL to be launched after restarting the browser.
[propget] HRESULT postInstallUrl([out, retval] BSTR*);
// Returns a PostInstallAction value indicating the action to be taken by the
// client after installation.
[propget] HRESULT postInstallAction([out, retval] LONG*);
}
[
object,
dual,
uuid(IGOOGLEUPDATE3WEB_IID),
helpstring("IGoogleUpdate3Web Interface"),
pointer_default(unique)
]
interface IGoogleUpdate3Web : IDispatch {
HRESULT createAppBundleWeb([out, retval] IDispatch** app_bundle_web);
};
[
object,
dual,
uuid(IAPPBUNDLEWEB_IID),
helpstring("IAppBundleWeb Interface"),
pointer_default(unique)
]
interface IAppBundleWeb : IDispatch {
[id(2)] HRESULT createApp([in] BSTR app_guid,
[in] BSTR brand_code,
[in] BSTR language,
[in] BSTR ap);
[id(3)] HRESULT createInstalledApp([in] BSTR app_id);
[id(4)] HRESULT createAllInstalledApps();
[propget] HRESULT displayLanguage([out, retval] BSTR*);
[propput] HRESULT displayLanguage([in] BSTR);
[propput] HRESULT parentHWND([in] ULONG_PTR hwnd);
[propget] HRESULT length([out, retval] int* index);
[id(DISPID_VALUE), propget] HRESULT appWeb(
[in] int index, [out, retval] IDispatch** app_web);
HRESULT initialize();
HRESULT checkForUpdate();
HRESULT download();
HRESULT install();
HRESULT pause();
HRESULT resume();
HRESULT cancel();
HRESULT downloadPackage([in] BSTR app_id, [in] BSTR package_name);
[propget] HRESULT currentState([out, retval] VARIANT* current_state);
};
[
object,
dual,
uuid(IAPPWEB_IID),
helpstring("IAppWeb Interface"),
pointer_default(unique)
]
interface IAppWeb : IDispatch {
[propget] HRESULT appId([out, retval] BSTR*);
// Returns an IAppVersionWeb IDispatch object.
[propget] HRESULT currentVersionWeb([out, retval] IDispatch** current);
[propget] HRESULT nextVersionWeb([out, retval] IDispatch** next);
// Returns an IAppCommandWeb IDispatch object, or NULL.
[propget] HRESULT command([in] BSTR command_id,
[out, retval] IDispatch** command);
HRESULT cancel();
[propget] HRESULT currentState([out, retval] IDispatch** current_state);
HRESULT launch();
HRESULT uninstall();
[propget] HRESULT serverInstallDataIndex([out, retval] BSTR*);
[propput] HRESULT serverInstallDataIndex([in] BSTR);
};
[
uuid(UPDATER_LEGACY_LIB_UUID),
version(1.0),
helpstring("Chromium Updater legacy type library.")
]
library UpdaterLegacyLib {
importlib("stdole2.tlb");
[
uuid(22181302-A8A6-4f84-A541-E5CBFC70CC43),
helpstring("GoogleUpdate3WebUserClass Class")
]
coclass GoogleUpdate3WebUserClass
{
[default] interface IUnknown;
}
interface ICurrentState;
interface IGoogleUpdate3Web;
interface IAppBundleWeb;
interface IAppWeb;
};
...@@ -183,17 +183,6 @@ TEST_F(IntegrationTest, RegisterTestApp) { ...@@ -183,17 +183,6 @@ TEST_F(IntegrationTest, RegisterTestApp) {
} }
#endif // OS_MAC #endif // OS_MAC
#if defined(OS_WIN)
// Tests the COM registration after the install. For now, tests that the
// COM interfaces are registered, which is indirectly testing the type
// library separation for the public, private, and legacy interfaces.
TEST_F(IntegrationTest, COMRegistration) {
Install();
ExpectInterfacesRegistered();
Uninstall();
}
#endif // OS_WIN
#endif // defined(OS_WIN) || !defined(COMPONENT_BUILD) #endif // defined(OS_WIN) || !defined(COMPONENT_BUILD)
} // namespace test } // namespace test
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#ifndef CHROME_UPDATER_TEST_INTEGRATION_TESTS_H_ #ifndef CHROME_UPDATER_TEST_INTEGRATION_TESTS_H_
#define CHROME_UPDATER_TEST_INTEGRATION_TESTS_H_ #define CHROME_UPDATER_TEST_INTEGRATION_TESTS_H_
#include "build/build_config.h"
namespace base { namespace base {
class CommandLine; class CommandLine;
class FilePath; class FilePath;
...@@ -14,6 +12,7 @@ class Version; ...@@ -14,6 +12,7 @@ class Version;
} // namespace base } // namespace base
namespace updater { namespace updater {
namespace test { namespace test {
// Removes traces of the updater from the system. It is best to run this at the // Removes traces of the updater from the system. It is best to run this at the
...@@ -85,11 +84,8 @@ void SetupFakeUpdaterHigherVersion(); ...@@ -85,11 +84,8 @@ void SetupFakeUpdaterHigherVersion();
// Expects that this version of updater is uninstalled from the system. // Expects that this version of updater is uninstalled from the system.
void ExpectCandidateUninstalled(); void ExpectCandidateUninstalled();
#if defined(OS_WIN)
void ExpectInterfacesRegistered();
#endif
} // namespace test } // namespace test
} // namespace updater } // namespace updater
#endif // CHROME_UPDATER_TEST_INTEGRATION_TESTS_H_ #endif // CHROME_UPDATER_TEST_INTEGRATION_TESTS_H_
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
namespace updater { namespace updater {
namespace test { namespace test {
// crbug.com/1112527: These tests are not compatible with component build. // crbug.com/1112527: These tests are not compatible with component build.
...@@ -177,4 +178,5 @@ base::FilePath GetFakeUpdaterInstallFolderPath(const base::Version& version) { ...@@ -177,4 +178,5 @@ base::FilePath GetFakeUpdaterInstallFolderPath(const base::Version& version) {
#endif // !defined(COMPONENT_BUILD) #endif // !defined(COMPONENT_BUILD)
} // namespace test } // namespace test
} // namespace updater } // namespace updater
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include <wrl/client.h>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
...@@ -14,9 +12,6 @@ ...@@ -14,9 +12,6 @@
#include "base/task/thread_pool.h" #include "base/task/thread_pool.h"
#include "base/version.h" #include "base/version.h"
#include "base/win/registry.h" #include "base/win/registry.h"
#include "chrome/updater/app/server/win/updater_idl.h"
#include "chrome/updater/app/server/win/updater_internal_idl.h"
#include "chrome/updater/app/server/win/updater_legacy_idl.h"
#include "chrome/updater/constants.h" #include "chrome/updater/constants.h"
#include "chrome/updater/test/integration_tests.h" #include "chrome/updater/test/integration_tests.h"
#include "chrome/updater/updater_version.h" #include "chrome/updater/updater_version.h"
...@@ -156,38 +151,5 @@ void Uninstall() { ...@@ -156,38 +151,5 @@ void Uninstall() {
SleepFor(5); SleepFor(5);
} }
// Tests if the typelibs and some of the public, internal, and
// legacy interfaces are available. Failure to query these interfaces indicates
// an issue with typelib registration.
void ExpectInterfacesRegistered() {
// IUpdater.
Microsoft::WRL::ComPtr<IUnknown> updater_server;
EXPECT_HRESULT_SUCCEEDED(::CoCreateInstance(__uuidof(UpdaterClass), nullptr,
CLSCTX_LOCAL_SERVER,
IID_PPV_ARGS(&updater_server)));
Microsoft::WRL::ComPtr<IUpdater> updater;
EXPECT_HRESULT_SUCCEEDED(updater_server.As(&updater));
// IUpdaterControl.
Microsoft::WRL::ComPtr<IUnknown> updater_control_server;
EXPECT_HRESULT_SUCCEEDED(::CoCreateInstance(
__uuidof(UpdaterControlClass), nullptr, CLSCTX_LOCAL_SERVER,
IID_PPV_ARGS(&updater_control_server)));
Microsoft::WRL::ComPtr<IUpdaterControl> updater_control;
EXPECT_HRESULT_SUCCEEDED(updater_control_server.As(&updater_control));
// IGoogleUpdate3Web and IAppBundleWeb.
Microsoft::WRL::ComPtr<IUnknown> updater_legacy_server;
EXPECT_HRESULT_SUCCEEDED(::CoCreateInstance(
__uuidof(GoogleUpdate3WebUserClass), nullptr, CLSCTX_LOCAL_SERVER,
IID_PPV_ARGS(&updater_legacy_server)));
Microsoft::WRL::ComPtr<IGoogleUpdate3Web> google_update;
EXPECT_HRESULT_SUCCEEDED(updater_legacy_server.As(&google_update));
Microsoft::WRL::ComPtr<IAppBundleWeb> app_bundle;
Microsoft::WRL::ComPtr<IDispatch> dispatch;
EXPECT_HRESULT_SUCCEEDED(google_update->createAppBundleWeb(&dispatch));
EXPECT_HRESULT_SUCCEEDED(dispatch.As(&app_bundle));
}
} // namespace test } // namespace test
} // namespace updater } // namespace updater
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "base/threading/sequenced_task_runner_handle.h" #include "base/threading/sequenced_task_runner_handle.h"
#include "base/win/scoped_bstr.h" #include "base/win/scoped_bstr.h"
#include "base/win/win_util.h" #include "base/win/win_util.h"
#include "chrome/updater/app/server/win/updater_idl.h"
#include "chrome/updater/test/test_app/constants.h" #include "chrome/updater/test/test_app/constants.h"
#include "chrome/updater/update_service.h" #include "chrome/updater/update_service.h"
...@@ -33,7 +32,7 @@ namespace { ...@@ -33,7 +32,7 @@ namespace {
HRESULT CreateUpdaterInterface(Microsoft::WRL::ComPtr<IUpdater>* updater) { HRESULT CreateUpdaterInterface(Microsoft::WRL::ComPtr<IUpdater>* updater) {
Microsoft::WRL::ComPtr<IUnknown> server; Microsoft::WRL::ComPtr<IUnknown> server;
HRESULT hr = ::CoCreateInstance(__uuidof(UpdaterClass)], nullptr, HRESULT hr = ::CoCreateInstance(CLSID_UpdaterClass, nullptr,
CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&server)); CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&server));
if (FAILED(hr)) { if (FAILED(hr)) {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <windows.h> #include <windows.h>
#include <wrl/client.h> #include <wrl/client.h>
class IUpdater; #include "chrome/updater/app/server/win/updater_idl.h"
namespace base { namespace base {
class SingleThreadTaskRunner; class SingleThreadTaskRunner;
......
...@@ -130,8 +130,6 @@ source_set("lib") { ...@@ -130,8 +130,6 @@ source_set("lib") {
"//chrome/updater:base", "//chrome/updater:base",
"//chrome/updater:version_header", "//chrome/updater:version_header",
"//chrome/updater/app/server/win:updater_idl_idl", "//chrome/updater/app/server/win:updater_idl_idl",
"//chrome/updater/app/server/win:updater_internal_idl_idl",
"//chrome/updater/app/server/win:updater_legacy_idl_idl",
"//components/update_client", "//components/update_client",
"//url:url", "//url:url",
] ]
......
...@@ -18,4 +18,25 @@ const base::char16 kRegistryValueInstallerProgress[] = L"InstallerProgress"; ...@@ -18,4 +18,25 @@ const base::char16 kRegistryValueInstallerProgress[] = L"InstallerProgress";
const base::char16 kWindowsServiceName[] = L"UpdaterService"; const base::char16 kWindowsServiceName[] = L"UpdaterService";
// {415FD747-D79E-42D7-93AC-1BA6E5FD4E93}
const CLSID CLSID_UpdaterServiceClass = {
0x415FD747,
0xD79E,
0x42D7,
{0x93, 0xAC, 0x1B, 0xA6, 0xE5, 0xFD, 0x4E, 0x93}};
// {1F87FE2F-D6A9-4711-9D11-8187705F8457}
const CLSID CLSID_UpdaterControlClass{
0x1f87fe2f,
0xd6a9,
0x4711,
{0x9d, 0x11, 0x81, 0x87, 0x70, 0x5f, 0x84, 0x57}};
// {22181302-A8A6-4f84-A541-E5CBFC70CC43}
const CLSID CLSID_GoogleUpdate3WebUserClass = {
0x22181302,
0xA8A6,
0x4f84,
{0xA5, 0x41, 0xE5, 0xCB, 0xFC, 0x70, 0xCC, 0x43}};
} // namespace updater } // namespace updater
...@@ -38,6 +38,12 @@ extern const base::char16 kRegistryValueInstallerProgress[]; ...@@ -38,6 +38,12 @@ extern const base::char16 kRegistryValueInstallerProgress[];
extern const base::char16 kWindowsServiceName[]; extern const base::char16 kWindowsServiceName[];
// The 'dynamic_guid' feature of midl.gni only allows for a single 'coclass'
// definition in the IDL file. Any other coclasses need to be defined here.
extern const CLSID CLSID_UpdaterServiceClass;
extern const CLSID CLSID_UpdaterControlClass;
extern const CLSID CLSID_GoogleUpdate3WebUserClass;
} // namespace updater } // namespace updater
#endif // CHROME_UPDATER_WIN_CONSTANTS_H_ #endif // CHROME_UPDATER_WIN_CONSTANTS_H_
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
#include "base/task/task_traits.h" #include "base/task/task_traits.h"
#include "base/threading/sequenced_task_runner_handle.h" #include "base/threading/sequenced_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "chrome/updater/app/server/win/updater_internal_idl.h" #include "chrome/updater/app/server/win/updater_idl.h"
#include "chrome/updater/win/constants.h"
namespace updater { namespace updater {
namespace { namespace {
...@@ -138,7 +139,7 @@ void ControlServiceProxy::RunOnSTA(base::OnceClosure callback) { ...@@ -138,7 +139,7 @@ void ControlServiceProxy::RunOnSTA(base::OnceClosure callback) {
DCHECK(STA_task_runner_->BelongsToCurrentThread()); DCHECK(STA_task_runner_->BelongsToCurrentThread());
Microsoft::WRL::ComPtr<IUnknown> server; Microsoft::WRL::ComPtr<IUnknown> server;
HRESULT hr = ::CoCreateInstance(__uuidof(UpdaterControlClass), nullptr, HRESULT hr = ::CoCreateInstance(CLSID_UpdaterControlClass, nullptr,
CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&server)); CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&server));
if (FAILED(hr)) { if (FAILED(hr)) {
DVLOG(2) << "Failed to instantiate the updater control server. " << std::hex DVLOG(2) << "Failed to instantiate the updater control server. " << std::hex
...@@ -200,7 +201,7 @@ void ControlServiceProxy::InitializeUpdateServiceOnSTA( ...@@ -200,7 +201,7 @@ void ControlServiceProxy::InitializeUpdateServiceOnSTA(
DCHECK(STA_task_runner_->BelongsToCurrentThread()); DCHECK(STA_task_runner_->BelongsToCurrentThread());
Microsoft::WRL::ComPtr<IUnknown> server; Microsoft::WRL::ComPtr<IUnknown> server;
HRESULT hr = ::CoCreateInstance(__uuidof(UpdaterControlClass), nullptr, HRESULT hr = ::CoCreateInstance(CLSID_UpdaterControlClass, nullptr,
CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&server)); CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&server));
if (FAILED(hr)) { if (FAILED(hr)) {
DVLOG(2) << "Failed to instantiate the updater control server. " << std::hex DVLOG(2) << "Failed to instantiate the updater control server. " << std::hex
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include "chrome/installer/util/self_cleaning_temp_dir.h" #include "chrome/installer/util/self_cleaning_temp_dir.h"
#include "chrome/installer/util/work_item_list.h" #include "chrome/installer/util/work_item_list.h"
#include "chrome/updater/app/server/win/updater_idl.h" #include "chrome/updater/app/server/win/updater_idl.h"
#include "chrome/updater/app/server/win/updater_internal_idl.h"
#include "chrome/updater/app/server/win/updater_legacy_idl.h"
#include "chrome/updater/constants.h" #include "chrome/updater/constants.h"
#include "chrome/updater/util.h" #include "chrome/updater/util.h"
#include "chrome/updater/win/constants.h" #include "chrome/updater/win/constants.h"
...@@ -50,9 +48,8 @@ void AddComServerWorkItems(HKEY root, ...@@ -50,9 +48,8 @@ void AddComServerWorkItems(HKEY root,
return; return;
} }
for (const auto& clsid : for (const auto& clsid : {__uuidof(UpdaterClass), CLSID_UpdaterControlClass,
{__uuidof(UpdaterClass), __uuidof(UpdaterControlClass), CLSID_GoogleUpdate3WebUserClass}) {
__uuidof(GoogleUpdate3WebUserClass)}) {
const base::string16 clsid_reg_path = GetComServerClsidRegistryPath(clsid); const base::string16 clsid_reg_path = GetComServerClsidRegistryPath(clsid);
// Delete any old registrations first. // Delete any old registrations first.
...@@ -96,7 +93,7 @@ void AddComServiceWorkItems(const base::FilePath& com_service_path, ...@@ -96,7 +93,7 @@ void AddComServiceWorkItems(const base::FilePath& com_service_path,
list->AddWorkItem(new installer::InstallServiceWorkItem( list->AddWorkItem(new installer::InstallServiceWorkItem(
kWindowsServiceName, kWindowsServiceName, kWindowsServiceName, kWindowsServiceName,
base::CommandLine(com_service_path), base::ASCIIToUTF16(UPDATER_KEY), base::CommandLine(com_service_path), base::ASCIIToUTF16(UPDATER_KEY),
{__uuidof(UpdaterServiceClass)}, {})); {CLSID_UpdaterServiceClass}, {}));
} }
// Adds work items to register the COM Interfaces with Windows. // Adds work items to register the COM Interfaces with Windows.
...@@ -134,18 +131,16 @@ void AddComInterfacesWorkItems(HKEY root, ...@@ -134,18 +131,16 @@ void AddComInterfacesWorkItems(HKEY root,
base::win::WStringFromGUID(iid), true); base::win::WStringFromGUID(iid), true);
// The TypeLib registration for the Ole Automation marshaler. // The TypeLib registration for the Ole Automation marshaler.
const base::FilePath qualified_typelib_path =
typelib_path.Append(GetComTypeLibResourceIndex(iid));
list->AddCreateRegKeyWorkItem(root, typelib_reg_path + L"\\1.0\\0\\win32", list->AddCreateRegKeyWorkItem(root, typelib_reg_path + L"\\1.0\\0\\win32",
WorkItem::kWow64Default); WorkItem::kWow64Default);
list->AddSetRegValueWorkItem(root, typelib_reg_path + L"\\1.0\\0\\win32", list->AddSetRegValueWorkItem(root, typelib_reg_path + L"\\1.0\\0\\win32",
WorkItem::kWow64Default, L"", WorkItem::kWow64Default, L"",
qualified_typelib_path.value(), true); typelib_path.value(), true);
list->AddCreateRegKeyWorkItem(root, typelib_reg_path + L"\\1.0\\0\\win64", list->AddCreateRegKeyWorkItem(root, typelib_reg_path + L"\\1.0\\0\\win64",
WorkItem::kWow64Default); WorkItem::kWow64Default);
list->AddSetRegValueWorkItem(root, typelib_reg_path + L"\\1.0\\0\\win64", list->AddSetRegValueWorkItem(root, typelib_reg_path + L"\\1.0\\0\\win64",
WorkItem::kWow64Default, L"", WorkItem::kWow64Default, L"",
qualified_typelib_path.value(), true); typelib_path.value(), true);
} }
} }
......
...@@ -5,11 +5,9 @@ ...@@ -5,11 +5,9 @@
#include "chrome/updater/win/setup/setup_util.h" #include "chrome/updater/win/setup/setup_util.h"
#include <string> #include <string>
#include <unordered_map>
#include <vector> #include <vector>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h" #include "base/containers/flat_set.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
...@@ -21,32 +19,10 @@ ...@@ -21,32 +19,10 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/win/win_util.h" #include "base/win/win_util.h"
#include "chrome/updater/app/server/win/updater_idl.h" #include "chrome/updater/app/server/win/updater_idl.h"
#include "chrome/updater/app/server/win/updater_internal_idl.h"
#include "chrome/updater/app/server/win/updater_legacy_idl.h"
#include "chrome/updater/util.h" #include "chrome/updater/util.h"
#include "chrome/updater/win/constants.h" #include "chrome/updater/win/constants.h"
#include "chrome/updater/win/task_scheduler.h" #include "chrome/updater/win/task_scheduler.h"
// Specialization for std::hash so that IID instances can be stored in an
// associative container. This implementation of the hash function adds
// together four 32-bit integers which make up an IID. The function does not
// have to be efficient or guarantee no collisions. It is used infrequently,
// for a small number of IIDs, and the container deals with collisions.
template <>
struct std::hash<IID> {
size_t operator()(const IID& iid) const {
return iid.Data1 + (iid.Data2 + (iid.Data3 << 16)) + [&iid]() {
size_t val = 0;
for (int i = 0; i < 2; ++i) {
for (int j = 0; j < 4; ++j) {
val += (iid.Data4[j + i * 4] << (j * 4));
}
}
return val;
}();
}
};
namespace updater { namespace updater {
namespace { namespace {
...@@ -79,7 +55,7 @@ base::string16 GetComServerClsidRegistryPath(REFCLSID clsid) { ...@@ -79,7 +55,7 @@ base::string16 GetComServerClsidRegistryPath(REFCLSID clsid) {
} }
base::string16 GetComServiceClsid() { base::string16 GetComServiceClsid() {
return base::win::WStringFromGUID(__uuidof(UpdaterServiceClass)); return base::win::WStringFromGUID(CLSID_UpdaterServiceClass);
} }
base::string16 GetComServiceClsidRegistryPath() { base::string16 GetComServiceClsidRegistryPath() {
...@@ -100,36 +76,8 @@ base::string16 GetComTypeLibRegistryPath(REFIID iid) { ...@@ -100,36 +76,8 @@ base::string16 GetComTypeLibRegistryPath(REFIID iid) {
{L"Software\\Classes\\TypeLib\\", base::win::WStringFromGUID(iid)}); {L"Software\\Classes\\TypeLib\\", base::win::WStringFromGUID(iid)});
} }
base::string16 GetComTypeLibResourceIndex(REFIID iid) {
// These values must be kept in sync with the numeric typelib resource
// indexes in the resource file.
constexpr base::char16 kUpdaterIndex[] = L"1";
constexpr base::char16 kUpdaterInternalIndex[] = L"2";
constexpr base::char16 kUpdaterLegacyIndex[] = L"3";
static const std::unordered_map<IID, const base::char16*> kTypeLibIndexes = {
// Updater typelib.
{__uuidof(ICompleteStatus), kUpdaterIndex},
{__uuidof(IUpdater), kUpdaterIndex},
{__uuidof(IUpdaterObserver), kUpdaterIndex},
{__uuidof(IUpdateState), kUpdaterIndex},
// Updater internal typelib.
{__uuidof(IUpdaterControl), kUpdaterInternalIndex},
{__uuidof(IUpdaterControlCallback), kUpdaterInternalIndex},
// Updater legacy typelib.
{__uuidof(IAppBundleWeb), kUpdaterLegacyIndex},
{__uuidof(IAppWeb), kUpdaterLegacyIndex},
{__uuidof(ICurrentState), kUpdaterLegacyIndex},
{__uuidof(IGoogleUpdate3Web), kUpdaterLegacyIndex},
};
auto index = kTypeLibIndexes.find(iid);
return index != kTypeLibIndexes.end() ? index->second : L"";
}
std::vector<GUID> GetInterfaces() { std::vector<GUID> GetInterfaces() {
static const std::vector<GUID> kInterfaces = { return {
__uuidof(IAppBundleWeb), __uuidof(IAppBundleWeb),
__uuidof(IAppWeb), __uuidof(IAppWeb),
__uuidof(ICompleteStatus), __uuidof(ICompleteStatus),
...@@ -141,7 +89,6 @@ std::vector<GUID> GetInterfaces() { ...@@ -141,7 +89,6 @@ std::vector<GUID> GetInterfaces() {
__uuidof(IUpdaterControlCallback), __uuidof(IUpdaterControlCallback),
__uuidof(IUpdaterObserver), __uuidof(IUpdaterObserver),
}; };
return kInterfaces;
} }
std::vector<base::FilePath> ParseFilesFromDeps(const base::FilePath& deps) { std::vector<base::FilePath> ParseFilesFromDeps(const base::FilePath& deps) {
......
...@@ -29,16 +29,6 @@ base::string16 GetComServiceAppidRegistryPath(); ...@@ -29,16 +29,6 @@ base::string16 GetComServiceAppidRegistryPath();
base::string16 GetComIidRegistryPath(REFIID iid); base::string16 GetComIidRegistryPath(REFIID iid);
base::string16 GetComTypeLibRegistryPath(REFIID iid); base::string16 GetComTypeLibRegistryPath(REFIID iid);
// Returns the resource index for the type library where the interface specified
// by the `iid` is defined. For encapsulation reasons, the updater interfaces
// are segregated in multiple IDL files, which get compiled to multiple type
// libraries. The type libraries are inserted in the compiled binary as
// resources with different resource indexes. The resource index becomes a
// suffix of the path to where the type library exists, such as
// `...\updater.exe\\1`. See the Windows SDK documentation for LoadTypeLib for
// details.
base::string16 GetComTypeLibResourceIndex(REFIID iid);
// Returns the interfaces ids of all interfaces declared in IDL of the updater. // Returns the interfaces ids of all interfaces declared in IDL of the updater.
std::vector<GUID> GetInterfaces(); std::vector<GUID> GetInterfaces();
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include "chrome/installer/util/install_util.h" #include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/work_item_list.h" #include "chrome/installer/util/work_item_list.h"
#include "chrome/updater/app/server/win/updater_idl.h" #include "chrome/updater/app/server/win/updater_idl.h"
#include "chrome/updater/app/server/win/updater_internal_idl.h"
#include "chrome/updater/app/server/win/updater_legacy_idl.h"
#include "chrome/updater/constants.h" #include "chrome/updater/constants.h"
#include "chrome/updater/util.h" #include "chrome/updater/util.h"
#include "chrome/updater/win/constants.h" #include "chrome/updater/win/constants.h"
...@@ -35,9 +33,8 @@ namespace updater { ...@@ -35,9 +33,8 @@ namespace updater {
namespace { namespace {
void DeleteComServer(HKEY root) { void DeleteComServer(HKEY root) {
for (const auto& clsid : for (const auto& clsid : {__uuidof(UpdaterClass), CLSID_UpdaterControlClass,
{__uuidof(UpdaterClass), __uuidof(UpdaterControlClass), CLSID_GoogleUpdate3WebUserClass}) {
__uuidof(GoogleUpdate3WebUserClass)}) {
InstallUtil::DeleteRegistryKey(root, GetComServerClsidRegistryPath(clsid), InstallUtil::DeleteRegistryKey(root, GetComServerClsidRegistryPath(clsid),
WorkItem::kWow64Default); WorkItem::kWow64Default);
} }
...@@ -54,7 +51,7 @@ void DeleteComService() { ...@@ -54,7 +51,7 @@ void DeleteComService() {
WorkItem::kWow64Default); WorkItem::kWow64Default);
if (!installer::InstallServiceWorkItem::DeleteService( if (!installer::InstallServiceWorkItem::DeleteService(
kWindowsServiceName, base::ASCIIToUTF16(UPDATER_KEY), kWindowsServiceName, base::ASCIIToUTF16(UPDATER_KEY),
{__uuidof(UpdaterServiceClass)}, {})) {CLSID_UpdaterServiceClass}, {}))
LOG(WARNING) << "DeleteService failed."; LOG(WARNING) << "DeleteService failed.";
} }
......
...@@ -143,5 +143,4 @@ BEGIN ...@@ -143,5 +143,4 @@ BEGIN
END END
1 TYPELIB "chrome/updater/app/server/win/updater_idl.tlb" 1 TYPELIB "chrome/updater/app/server/win/updater_idl.tlb"
2 TYPELIB "chrome/updater/app/server/win/updater_internal_idl.tlb"
3 TYPELIB "chrome/updater/app/server/win/updater_legacy_idl.tlb"
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
*********************************************************/ *********************************************************/
#define PROXY_DELEGATION
#include <rpcproxy.h> #include <rpcproxy.h>
......
...@@ -67,6 +67,24 @@ typedef IID CLSID; ...@@ -67,6 +67,24 @@ typedef IID CLSID;
#endif // !_MIDL_USE_GUIDDEF_ #endif // !_MIDL_USE_GUIDDEF_
MIDL_DEFINE_GUID(IID, IID_ICurrentState,0x247954F9,0x9EDC,0x4E68,0x8C,0xC3,0x15,0x0C,0x2B,0x89,0xEA,0xDF);
MIDL_DEFINE_GUID(IID, IID_IGoogleUpdate3Web,0x494B20CF,0x282E,0x4BDD,0x9F,0x5D,0xB7,0x0C,0xB0,0x9D,0x35,0x1E);
MIDL_DEFINE_GUID(IID, IID_IAppBundleWeb,0xDD42475D,0x6D46,0x496a,0x92,0x4E,0xBD,0x56,0x30,0xB4,0xCB,0xBA);
MIDL_DEFINE_GUID(IID, IID_IAppWeb,0x18D0F672,0x18B4,0x48e6,0xAD,0x36,0x6E,0x6B,0xF0,0x1D,0xBB,0xC4);
MIDL_DEFINE_GUID(IID, IID_IUpdaterControlCallback,0xD272C794,0x2ACE,0x4584,0xB9,0x93,0x3B,0x90,0xC6,0x22,0xBE,0x65);
MIDL_DEFINE_GUID(IID, IID_IUpdaterControl,0x526DA036,0x9BD3,0x4697,0x86,0x5A,0xDA,0x12,0xD3,0x7D,0xFF,0xCA);
MIDL_DEFINE_GUID(IID, IID_IUpdateState,0x46ACF70B,0xAC13,0x406D,0xB5,0x3B,0xB2,0xC4,0xBF,0x09,0x1F,0xF6); MIDL_DEFINE_GUID(IID, IID_IUpdateState,0x46ACF70B,0xAC13,0x406D,0xB5,0x3B,0xB2,0xC4,0xBF,0x09,0x1F,0xF6);
...@@ -84,9 +102,6 @@ MIDL_DEFINE_GUID(IID, LIBID_UpdaterLib,0x69464FF0,0xD9EC,0x4037,0xA3,0x5F,0x8A,0 ...@@ -84,9 +102,6 @@ MIDL_DEFINE_GUID(IID, LIBID_UpdaterLib,0x69464FF0,0xD9EC,0x4037,0xA3,0x5F,0x8A,0
MIDL_DEFINE_GUID(CLSID, CLSID_UpdaterClass,0x158428a4,0x6014,0x4978,0x83,0xba,0x9f,0xad,0x0d,0xab,0xe7,0x91); MIDL_DEFINE_GUID(CLSID, CLSID_UpdaterClass,0x158428a4,0x6014,0x4978,0x83,0xba,0x9f,0xad,0x0d,0xab,0xe7,0x91);
MIDL_DEFINE_GUID(CLSID, CLSID_UpdaterServiceClass,0x415FD747,0xD79E,0x42D7,0x93,0xAC,0x1B,0xA6,0xE5,0xFD,0x4E,0x93);
#undef MIDL_DEFINE_GUID #undef MIDL_DEFINE_GUID
#ifdef __cplusplus #ifdef __cplusplus
......
/*********************************************************
DllData file -- generated by MIDL compiler
DO NOT ALTER THIS FILE
This file is regenerated by MIDL on every IDL file compile.
To completely reconstruct this file, delete it and rerun MIDL
on all the IDL files in this DLL, specifying this file for the
/dlldata command line option
*********************************************************/
#include <rpcproxy.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_PROXY_FILE( updater_internal_idl )
PROXYFILE_LIST_START
/* Start of list */
REFERENCE_PROXY_FILE( updater_internal_idl ),
/* End of list */
PROXYFILE_LIST_END
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
#ifdef __cplusplus
} /*extern "C" */
#endif
/* end of generated dlldata file */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.xx.xxxx */
/* at a redacted point in time
*/
/* Compiler settings for ../../chrome/updater/app/server/win/updater_internal_idl.template:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.0622
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __updater_internal_idl_h__
#define __updater_internal_idl_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IUpdaterControlCallback_FWD_DEFINED__
#define __IUpdaterControlCallback_FWD_DEFINED__
typedef interface IUpdaterControlCallback IUpdaterControlCallback;
#endif /* __IUpdaterControlCallback_FWD_DEFINED__ */
#ifndef __IUpdaterControl_FWD_DEFINED__
#define __IUpdaterControl_FWD_DEFINED__
typedef interface IUpdaterControl IUpdaterControl;
#endif /* __IUpdaterControl_FWD_DEFINED__ */
#ifndef __UpdaterControlClass_FWD_DEFINED__
#define __UpdaterControlClass_FWD_DEFINED__
#ifdef __cplusplus
typedef class UpdaterControlClass UpdaterControlClass;
#else
typedef struct UpdaterControlClass UpdaterControlClass;
#endif /* __cplusplus */
#endif /* __UpdaterControlClass_FWD_DEFINED__ */
#ifndef __IUpdaterControl_FWD_DEFINED__
#define __IUpdaterControl_FWD_DEFINED__
typedef interface IUpdaterControl IUpdaterControl;
#endif /* __IUpdaterControl_FWD_DEFINED__ */
#ifndef __IUpdaterControlCallback_FWD_DEFINED__
#define __IUpdaterControlCallback_FWD_DEFINED__
typedef interface IUpdaterControlCallback IUpdaterControlCallback;
#endif /* __IUpdaterControlCallback_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IUpdaterControlCallback_INTERFACE_DEFINED__
#define __IUpdaterControlCallback_INTERFACE_DEFINED__
/* interface IUpdaterControlCallback */
/* [unique][helpstring][uuid][dual][object] */
EXTERN_C const IID IID_IUpdaterControlCallback;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("D272C794-2ACE-4584-B993-3B90C622BE65")
IUpdaterControlCallback : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Run(
/* [in] */ LONG result) = 0;
};
#else /* C style interface */
typedef struct IUpdaterControlCallbackVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IUpdaterControlCallback * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IUpdaterControlCallback * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IUpdaterControlCallback * This);
HRESULT ( STDMETHODCALLTYPE *Run )(
IUpdaterControlCallback * This,
/* [in] */ LONG result);
END_INTERFACE
} IUpdaterControlCallbackVtbl;
interface IUpdaterControlCallback
{
CONST_VTBL struct IUpdaterControlCallbackVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUpdaterControlCallback_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IUpdaterControlCallback_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IUpdaterControlCallback_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IUpdaterControlCallback_Run(This,result) \
( (This)->lpVtbl -> Run(This,result) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IUpdaterControlCallback_INTERFACE_DEFINED__ */
#ifndef __IUpdaterControl_INTERFACE_DEFINED__
#define __IUpdaterControl_INTERFACE_DEFINED__
/* interface IUpdaterControl */
/* [unique][helpstring][uuid][dual][object] */
EXTERN_C const IID IID_IUpdaterControl;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("526DA036-9BD3-4697-865A-DA12D37DFFCA")
IUpdaterControl : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Run(
/* [in] */ IUpdaterControlCallback *callback) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeUpdateService(
/* [in] */ IUpdaterControlCallback *callback) = 0;
};
#else /* C style interface */
typedef struct IUpdaterControlVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IUpdaterControl * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IUpdaterControl * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IUpdaterControl * This);
HRESULT ( STDMETHODCALLTYPE *Run )(
IUpdaterControl * This,
/* [in] */ IUpdaterControlCallback *callback);
HRESULT ( STDMETHODCALLTYPE *InitializeUpdateService )(
IUpdaterControl * This,
/* [in] */ IUpdaterControlCallback *callback);
END_INTERFACE
} IUpdaterControlVtbl;
interface IUpdaterControl
{
CONST_VTBL struct IUpdaterControlVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUpdaterControl_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IUpdaterControl_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IUpdaterControl_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IUpdaterControl_Run(This,callback) \
( (This)->lpVtbl -> Run(This,callback) )
#define IUpdaterControl_InitializeUpdateService(This,callback) \
( (This)->lpVtbl -> InitializeUpdateService(This,callback) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IUpdaterControl_INTERFACE_DEFINED__ */
#ifndef __UpdaterInternalLib_LIBRARY_DEFINED__
#define __UpdaterInternalLib_LIBRARY_DEFINED__
/* library UpdaterInternalLib */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_UpdaterInternalLib;
EXTERN_C const CLSID CLSID_UpdaterControlClass;
#ifdef __cplusplus
class DECLSPEC_UUID("1F87FE2F-D6A9-4711-9D11-8187705F8457")
UpdaterControlClass;
#endif
#endif /* __UpdaterInternalLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 8.xx.xxxx */
/* at a redacted point in time
*/
/* Compiler settings for ../../chrome/updater/app/server/win/updater_internal_idl.template:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.0622
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#ifdef __cplusplus
extern "C"{
#endif
#include <rpc.h>
#include <rpcndr.h>
#ifdef _MIDL_USE_GUIDDEF_
#ifndef INITGUID
#define INITGUID
#include <guiddef.h>
#undef INITGUID
#else
#include <guiddef.h>
#endif
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
#else // !_MIDL_USE_GUIDDEF_
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
EXTERN_C __declspec(selectany) const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif // !_MIDL_USE_GUIDDEF_
MIDL_DEFINE_GUID(IID, IID_IUpdaterControlCallback,0xD272C794,0x2ACE,0x4584,0xB9,0x93,0x3B,0x90,0xC6,0x22,0xBE,0x65);
MIDL_DEFINE_GUID(IID, IID_IUpdaterControl,0x526DA036,0x9BD3,0x4697,0x86,0x5A,0xDA,0x12,0xD3,0x7D,0xFF,0xCA);
MIDL_DEFINE_GUID(IID, LIBID_UpdaterInternalLib,0xC6CE92DB,0x72CA,0x42EF,0x8C,0x98,0x6E,0xE9,0x24,0x81,0xB3,0xC9);
MIDL_DEFINE_GUID(CLSID, CLSID_UpdaterControlClass,0x1F87FE2F,0xD6A9,0x4711,0x9D,0x11,0x81,0x87,0x70,0x5F,0x84,0x57);
#undef MIDL_DEFINE_GUID
#ifdef __cplusplus
}
#endif
/*********************************************************
DllData file -- generated by MIDL compiler
DO NOT ALTER THIS FILE
This file is regenerated by MIDL on every IDL file compile.
To completely reconstruct this file, delete it and rerun MIDL
on all the IDL files in this DLL, specifying this file for the
/dlldata command line option
*********************************************************/
#define PROXY_DELEGATION
#include <rpcproxy.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_PROXY_FILE( updater_legacy_idl )
PROXYFILE_LIST_START
/* Start of list */
REFERENCE_PROXY_FILE( updater_legacy_idl ),
/* End of list */
PROXYFILE_LIST_END
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
#ifdef __cplusplus
} /*extern "C" */
#endif
/* end of generated dlldata file */
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 8.xx.xxxx */
/* at a redacted point in time
*/
/* Compiler settings for ../../chrome/updater/app/server/win/updater_legacy_idl.template:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.0622
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#ifdef __cplusplus
extern "C"{
#endif
#include <rpc.h>
#include <rpcndr.h>
#ifdef _MIDL_USE_GUIDDEF_
#ifndef INITGUID
#define INITGUID
#include <guiddef.h>
#undef INITGUID
#else
#include <guiddef.h>
#endif
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
#else // !_MIDL_USE_GUIDDEF_
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
EXTERN_C __declspec(selectany) const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif // !_MIDL_USE_GUIDDEF_
MIDL_DEFINE_GUID(IID, IID_ICurrentState,0x247954F9,0x9EDC,0x4E68,0x8C,0xC3,0x15,0x0C,0x2B,0x89,0xEA,0xDF);
MIDL_DEFINE_GUID(IID, IID_IGoogleUpdate3Web,0x494B20CF,0x282E,0x4BDD,0x9F,0x5D,0xB7,0x0C,0xB0,0x9D,0x35,0x1E);
MIDL_DEFINE_GUID(IID, IID_IAppBundleWeb,0xDD42475D,0x6D46,0x496a,0x92,0x4E,0xBD,0x56,0x30,0xB4,0xCB,0xBA);
MIDL_DEFINE_GUID(IID, IID_IAppWeb,0x18D0F672,0x18B4,0x48e6,0xAD,0x36,0x6E,0x6B,0xF0,0x1D,0xBB,0xC4);
MIDL_DEFINE_GUID(IID, LIBID_UpdaterLegacyLib,0x69464FF0,0xD9EC,0x4037,0xA3,0x5F,0x8A,0xE4,0x35,0x81,0x06,0xCC);
MIDL_DEFINE_GUID(CLSID, CLSID_GoogleUpdate3WebUserClass,0x22181302,0xA8A6,0x4f84,0xA5,0x41,0xE5,0xCB,0xFC,0x70,0xCC,0x43);
#undef MIDL_DEFINE_GUID
#ifdef __cplusplus
}
#endif
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
*********************************************************/ *********************************************************/
#define PROXY_DELEGATION
#include <rpcproxy.h> #include <rpcproxy.h>
......
...@@ -67,6 +67,24 @@ typedef IID CLSID; ...@@ -67,6 +67,24 @@ typedef IID CLSID;
#endif // !_MIDL_USE_GUIDDEF_ #endif // !_MIDL_USE_GUIDDEF_
MIDL_DEFINE_GUID(IID, IID_ICurrentState,0x247954F9,0x9EDC,0x4E68,0x8C,0xC3,0x15,0x0C,0x2B,0x89,0xEA,0xDF);
MIDL_DEFINE_GUID(IID, IID_IGoogleUpdate3Web,0x494B20CF,0x282E,0x4BDD,0x9F,0x5D,0xB7,0x0C,0xB0,0x9D,0x35,0x1E);
MIDL_DEFINE_GUID(IID, IID_IAppBundleWeb,0xDD42475D,0x6D46,0x496a,0x92,0x4E,0xBD,0x56,0x30,0xB4,0xCB,0xBA);
MIDL_DEFINE_GUID(IID, IID_IAppWeb,0x18D0F672,0x18B4,0x48e6,0xAD,0x36,0x6E,0x6B,0xF0,0x1D,0xBB,0xC4);
MIDL_DEFINE_GUID(IID, IID_IUpdaterControlCallback,0xD272C794,0x2ACE,0x4584,0xB9,0x93,0x3B,0x90,0xC6,0x22,0xBE,0x65);
MIDL_DEFINE_GUID(IID, IID_IUpdaterControl,0x526DA036,0x9BD3,0x4697,0x86,0x5A,0xDA,0x12,0xD3,0x7D,0xFF,0xCA);
MIDL_DEFINE_GUID(IID, IID_IUpdateState,0x46ACF70B,0xAC13,0x406D,0xB5,0x3B,0xB2,0xC4,0xBF,0x09,0x1F,0xF6); MIDL_DEFINE_GUID(IID, IID_IUpdateState,0x46ACF70B,0xAC13,0x406D,0xB5,0x3B,0xB2,0xC4,0xBF,0x09,0x1F,0xF6);
...@@ -84,9 +102,6 @@ MIDL_DEFINE_GUID(IID, LIBID_UpdaterLib,0x69464FF0,0xD9EC,0x4037,0xA3,0x5F,0x8A,0 ...@@ -84,9 +102,6 @@ MIDL_DEFINE_GUID(IID, LIBID_UpdaterLib,0x69464FF0,0xD9EC,0x4037,0xA3,0x5F,0x8A,0
MIDL_DEFINE_GUID(CLSID, CLSID_UpdaterClass,0x158428a4,0x6014,0x4978,0x83,0xba,0x9f,0xad,0x0d,0xab,0xe7,0x91); MIDL_DEFINE_GUID(CLSID, CLSID_UpdaterClass,0x158428a4,0x6014,0x4978,0x83,0xba,0x9f,0xad,0x0d,0xab,0xe7,0x91);
MIDL_DEFINE_GUID(CLSID, CLSID_UpdaterServiceClass,0x415FD747,0xD79E,0x42D7,0x93,0xAC,0x1B,0xA6,0xE5,0xFD,0x4E,0x93);
#undef MIDL_DEFINE_GUID #undef MIDL_DEFINE_GUID
#ifdef __cplusplus #ifdef __cplusplus
......
/*********************************************************
DllData file -- generated by MIDL compiler
DO NOT ALTER THIS FILE
This file is regenerated by MIDL on every IDL file compile.
To completely reconstruct this file, delete it and rerun MIDL
on all the IDL files in this DLL, specifying this file for the
/dlldata command line option
*********************************************************/
#include <rpcproxy.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_PROXY_FILE( updater_internal_idl )
PROXYFILE_LIST_START
/* Start of list */
REFERENCE_PROXY_FILE( updater_internal_idl ),
/* End of list */
PROXYFILE_LIST_END
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
#ifdef __cplusplus
} /*extern "C" */
#endif
/* end of generated dlldata file */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.xx.xxxx */
/* at a redacted point in time
*/
/* Compiler settings for ../../chrome/updater/app/server/win/updater_internal_idl.template:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.xx.xxxx
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __updater_internal_idl_h__
#define __updater_internal_idl_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IUpdaterControlCallback_FWD_DEFINED__
#define __IUpdaterControlCallback_FWD_DEFINED__
typedef interface IUpdaterControlCallback IUpdaterControlCallback;
#endif /* __IUpdaterControlCallback_FWD_DEFINED__ */
#ifndef __IUpdaterControl_FWD_DEFINED__
#define __IUpdaterControl_FWD_DEFINED__
typedef interface IUpdaterControl IUpdaterControl;
#endif /* __IUpdaterControl_FWD_DEFINED__ */
#ifndef __UpdaterControlClass_FWD_DEFINED__
#define __UpdaterControlClass_FWD_DEFINED__
#ifdef __cplusplus
typedef class UpdaterControlClass UpdaterControlClass;
#else
typedef struct UpdaterControlClass UpdaterControlClass;
#endif /* __cplusplus */
#endif /* __UpdaterControlClass_FWD_DEFINED__ */
#ifndef __IUpdaterControl_FWD_DEFINED__
#define __IUpdaterControl_FWD_DEFINED__
typedef interface IUpdaterControl IUpdaterControl;
#endif /* __IUpdaterControl_FWD_DEFINED__ */
#ifndef __IUpdaterControlCallback_FWD_DEFINED__
#define __IUpdaterControlCallback_FWD_DEFINED__
typedef interface IUpdaterControlCallback IUpdaterControlCallback;
#endif /* __IUpdaterControlCallback_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IUpdaterControlCallback_INTERFACE_DEFINED__
#define __IUpdaterControlCallback_INTERFACE_DEFINED__
/* interface IUpdaterControlCallback */
/* [unique][helpstring][uuid][dual][object] */
EXTERN_C const IID IID_IUpdaterControlCallback;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("D272C794-2ACE-4584-B993-3B90C622BE65")
IUpdaterControlCallback : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Run(
/* [in] */ LONG result) = 0;
};
#else /* C style interface */
typedef struct IUpdaterControlCallbackVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IUpdaterControlCallback * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IUpdaterControlCallback * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IUpdaterControlCallback * This);
HRESULT ( STDMETHODCALLTYPE *Run )(
IUpdaterControlCallback * This,
/* [in] */ LONG result);
END_INTERFACE
} IUpdaterControlCallbackVtbl;
interface IUpdaterControlCallback
{
CONST_VTBL struct IUpdaterControlCallbackVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUpdaterControlCallback_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IUpdaterControlCallback_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IUpdaterControlCallback_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IUpdaterControlCallback_Run(This,result) \
( (This)->lpVtbl -> Run(This,result) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IUpdaterControlCallback_INTERFACE_DEFINED__ */
#ifndef __IUpdaterControl_INTERFACE_DEFINED__
#define __IUpdaterControl_INTERFACE_DEFINED__
/* interface IUpdaterControl */
/* [unique][helpstring][uuid][dual][object] */
EXTERN_C const IID IID_IUpdaterControl;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("526DA036-9BD3-4697-865A-DA12D37DFFCA")
IUpdaterControl : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Run(
/* [in] */ IUpdaterControlCallback *callback) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeUpdateService(
/* [in] */ IUpdaterControlCallback *callback) = 0;
};
#else /* C style interface */
typedef struct IUpdaterControlVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IUpdaterControl * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IUpdaterControl * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IUpdaterControl * This);
HRESULT ( STDMETHODCALLTYPE *Run )(
IUpdaterControl * This,
/* [in] */ IUpdaterControlCallback *callback);
HRESULT ( STDMETHODCALLTYPE *InitializeUpdateService )(
IUpdaterControl * This,
/* [in] */ IUpdaterControlCallback *callback);
END_INTERFACE
} IUpdaterControlVtbl;
interface IUpdaterControl
{
CONST_VTBL struct IUpdaterControlVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUpdaterControl_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IUpdaterControl_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IUpdaterControl_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IUpdaterControl_Run(This,callback) \
( (This)->lpVtbl -> Run(This,callback) )
#define IUpdaterControl_InitializeUpdateService(This,callback) \
( (This)->lpVtbl -> InitializeUpdateService(This,callback) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IUpdaterControl_INTERFACE_DEFINED__ */
#ifndef __UpdaterInternalLib_LIBRARY_DEFINED__
#define __UpdaterInternalLib_LIBRARY_DEFINED__
/* library UpdaterInternalLib */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_UpdaterInternalLib;
EXTERN_C const CLSID CLSID_UpdaterControlClass;
#ifdef __cplusplus
class DECLSPEC_UUID("1F87FE2F-D6A9-4711-9D11-8187705F8457")
UpdaterControlClass;
#endif
#endif /* __UpdaterInternalLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 8.xx.xxxx */
/* at a redacted point in time
*/
/* Compiler settings for ../../chrome/updater/app/server/win/updater_internal_idl.template:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.xx.xxxx
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#ifdef __cplusplus
extern "C"{
#endif
#include <rpc.h>
#include <rpcndr.h>
#ifdef _MIDL_USE_GUIDDEF_
#ifndef INITGUID
#define INITGUID
#include <guiddef.h>
#undef INITGUID
#else
#include <guiddef.h>
#endif
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
#else // !_MIDL_USE_GUIDDEF_
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
EXTERN_C __declspec(selectany) const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif // !_MIDL_USE_GUIDDEF_
MIDL_DEFINE_GUID(IID, IID_IUpdaterControlCallback,0xD272C794,0x2ACE,0x4584,0xB9,0x93,0x3B,0x90,0xC6,0x22,0xBE,0x65);
MIDL_DEFINE_GUID(IID, IID_IUpdaterControl,0x526DA036,0x9BD3,0x4697,0x86,0x5A,0xDA,0x12,0xD3,0x7D,0xFF,0xCA);
MIDL_DEFINE_GUID(IID, LIBID_UpdaterInternalLib,0xC6CE92DB,0x72CA,0x42EF,0x8C,0x98,0x6E,0xE9,0x24,0x81,0xB3,0xC9);
MIDL_DEFINE_GUID(CLSID, CLSID_UpdaterControlClass,0x1F87FE2F,0xD6A9,0x4711,0x9D,0x11,0x81,0x87,0x70,0x5F,0x84,0x57);
#undef MIDL_DEFINE_GUID
#ifdef __cplusplus
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment