| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/scoped_native_library.h" | 8 #include "base/scoped_native_library.h" |
| 9 #include "remoting/base/auto_thread.h" | 9 #include "remoting/base/auto_thread.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
| 13 #include <objbase.h> | 13 #include <objbase.h> |
| 14 #include "base/win/windows_version.h" | 14 #include "base/win/windows_version.h" |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 const char kThreadName[] = "Test thread"; | 19 const char kThreadName[] = "Test thread"; |
| 20 const char kThreadName2[] = "Test thread 2"; | |
| 21 | 20 |
| 22 void SetFlagTask(bool* success) { | 21 void SetFlagTask(bool* success) { |
| 23 *success = true; | 22 *success = true; |
| 24 } | 23 } |
| 25 | 24 |
| 26 void PostSetFlagTask( | 25 void PostSetFlagTask( |
| 27 scoped_refptr<base::TaskRunner> task_runner, | 26 scoped_refptr<base::TaskRunner> task_runner, |
| 28 bool* success) { | 27 bool* success) { |
| 29 task_runner->PostTask(FROM_HERE, base::Bind(&SetFlagTask, success)); | 28 task_runner->PostTask(FROM_HERE, base::Bind(&SetFlagTask, success)); |
| 30 } | 29 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // Whether the thread is the "main" STA apartment depends upon previous | 192 // Whether the thread is the "main" STA apartment depends upon previous |
| 194 // COM activity in this test process, so allow both types here. | 193 // COM activity in this test process, so allow both types here. |
| 195 EXPECT_TRUE(apt_type == APTTYPE_MAINSTA || apt_type == APTTYPE_STA); | 194 EXPECT_TRUE(apt_type == APTTYPE_MAINSTA || apt_type == APTTYPE_STA); |
| 196 } else { | 195 } else { |
| 197 EXPECT_EQ(E_NOTIMPL, hresult); | 196 EXPECT_EQ(E_NOTIMPL, hresult); |
| 198 } | 197 } |
| 199 } | 198 } |
| 200 #endif // defined(OS_WIN) | 199 #endif // defined(OS_WIN) |
| 201 | 200 |
| 202 } // namespace remoting | 201 } // namespace remoting |
| OLD | NEW |