Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5604)

Unified Diff: chrome/test/testing_browser_process.h

Issue 16554: WaitableEvent (Closed)
Patch Set: Addresssing darin's comments (round 2) Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_browser_process.h
diff --git a/chrome/test/testing_browser_process.h b/chrome/test/testing_browser_process.h
index 4e756f11419008e78cde26fe213d85503fa4c562..76f349cbebc431b7ff3b07cdf165a02cc3e84d9b 100644
--- a/chrome/test/testing_browser_process.h
+++ b/chrome/test/testing_browser_process.h
@@ -15,17 +15,17 @@
#include <string>
#include "base/string_util.h"
+#include "base/waitable_event.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/notification_service.h"
#include "base/logging.h"
class TestingBrowserProcess : public BrowserProcess {
public:
- TestingBrowserProcess() {
-#if defined(OS_WIN)
- shutdown_event_ = ::CreateEvent(NULL, TRUE, FALSE, NULL);
-#endif
+ TestingBrowserProcess()
+ : shutdown_event_(new base::WaitableEvent(true, false)) {
}
+
virtual ~TestingBrowserProcess() {
}
@@ -122,15 +122,11 @@ class TestingBrowserProcess : public BrowserProcess {
virtual MemoryModel memory_model() { return HIGH_MEMORY_MODEL; }
-#if defined(OS_WIN)
- virtual HANDLE shutdown_event() { return shutdown_event_; }
-#endif
+ virtual base::WaitableEvent* shutdown_event() { return shutdown_event_.get(); }
private:
NotificationService notification_service_;
-#if defined(OS_WIN)
- HANDLE shutdown_event_;
-#endif
+ scoped_ptr<base::WaitableEvent> shutdown_event_;
DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
};
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698