Commit 424f960b authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Rename SignalObjectReleaseEvent to SignalObjectCountZero in ComServerModule

Bug: 734095
Change-Id: I13ad555008c546e71bf510acd4923a188277ad76
Reviewed-on: https://chromium-review.googlesource.com/923165Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Commit-Queue: Xi Cheng <chengx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537683}
parent 88fb0a0e
......@@ -22,8 +22,8 @@ namespace notification_helper {
// The reset policy of the event MUST BE set to MANUAL to avoid signaling the
// event in IsSignaled() itself, which is called by IsEventSignaled().
ComServerModule::ComServerModule()
: com_object_released_(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED) {}
: object_zero_count_(base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED) {}
ComServerModule::~ComServerModule() = default;
......@@ -41,7 +41,7 @@ HRESULT ComServerModule::RegisterClassObjects() {
// method is invoked when the last instance object of the module is released.
auto& module =
Microsoft::WRL::Module<Microsoft::WRL::OutOfProcDisableCaching>::Create(
this, &ComServerModule::SignalObjectReleaseEvent);
this, &ComServerModule::SignalObjectCountZero);
// Usually COM module classes statically define their CLSID at compile time
// through the use of various macros, and WRL::Module internals takes care of
......@@ -99,15 +99,15 @@ void ComServerModule::UnregisterClassObjects() {
}
bool ComServerModule::IsEventSignaled() {
return com_object_released_.IsSignaled();
return object_zero_count_.IsSignaled();
}
void ComServerModule::WaitForZeroObjectCount() {
com_object_released_.Wait();
object_zero_count_.Wait();
}
void ComServerModule::SignalObjectReleaseEvent() {
com_object_released_.Signal();
void ComServerModule::SignalObjectCountZero() {
object_zero_count_.Signal();
}
} // namespace notification_helper
......@@ -35,15 +35,15 @@ class ComServerModule {
// Waits for all instance objects are released from the module.
void WaitForZeroObjectCount();
// Signals the COM object release event.
void SignalObjectReleaseEvent();
// Sends out the signal that all objects are now released from the module.
void SignalObjectCountZero();
// Identifiers of registered class objects. Used for unregistration.
DWORD cookies_[1] = {0};
// This event starts "unsignaled", and is signaled when the last instance
// object is released from the module.
base::WaitableEvent com_object_released_;
base::WaitableEvent object_zero_count_;
DISALLOW_COPY_AND_ASSIGN(ComServerModule);
};
......
......@@ -33,6 +33,7 @@ class NotificationActivator
protected:
~NotificationActivator() override;
private:
DISALLOW_COPY_AND_ASSIGN(NotificationActivator);
};
......
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