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

Unified Diff: content/test/webrtc_audio_device_test.cc

Issue 10990079: Clean up scoped_com_initializer.h. Remove #ifdefs for non-Windows (this is in base/win, no one sho… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
Index: content/test/webrtc_audio_device_test.cc
===================================================================
--- content/test/webrtc_audio_device_test.cc (revision 158860)
+++ content/test/webrtc_audio_device_test.cc (working copy)
@@ -11,7 +11,6 @@
#include "base/message_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
-#include "base/win/scoped_com_initializer.h"
#include "content/browser/renderer_host/media/audio_input_renderer_host.h"
#include "content/browser/renderer_host/media/audio_renderer_host.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
@@ -37,7 +36,10 @@
#include "third_party/webrtc/voice_engine/include/voe_file.h"
#include "third_party/webrtc/voice_engine/include/voe_network.h"
-using base::win::ScopedCOMInitializer;
+#if defined(OS_WIN)
+#include "base/win/scoped_com_initializer.h"
+#endif
+
using testing::_;
using testing::InvokeWithoutArgs;
using testing::Return;
@@ -196,9 +198,11 @@
}
void WebRTCAudioDeviceTest::InitializeIOThread(const char* thread_name) {
+#if defined(OS_WIN)
// We initialize COM (STA) on our IO thread as is done in Chrome.
// See BrowserProcessSubThread::Init.
- initialize_com_.reset(new ScopedCOMInitializer());
+ initialize_com_.reset(new base::win::ScopedCOMInitializer());
+#endif
// Set the current thread as the IO thread.
io_thread_.reset(new content::TestBrowserThread(content::BrowserThread::IO,
@@ -222,7 +226,10 @@
resource_context_.reset();
test_request_context_.reset();
+
+#if defined(OS_WIN)
initialize_com_.reset();
+#endif
}
void WebRTCAudioDeviceTest::CreateChannel(const char* name) {

Powered by Google App Engine
This is Rietveld 408576698