| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 *extension_); | 1310 *extension_); |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 void RegisterMediaRouteProvider() { | 1313 void RegisterMediaRouteProvider() { |
| 1314 media_router_proxy_->RegisterMediaRouteProvider( | 1314 media_router_proxy_->RegisterMediaRouteProvider( |
| 1315 std::move(media_route_provider_proxy_), | 1315 std::move(media_route_provider_proxy_), |
| 1316 base::Bind(&RegisterMediaRouteProviderHandler::Invoke, | 1316 base::Bind(&RegisterMediaRouteProviderHandler::Invoke, |
| 1317 base::Unretained(&provide_handler_))); | 1317 base::Unretained(&provide_handler_))); |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 void ProcessEventLoop() { message_loop_.RunUntilIdle(); } | 1320 void ProcessEventLoop() { base::RunLoop().RunUntilIdle(); } |
| 1321 | 1321 |
| 1322 void ExpectWakeReasonBucketCount(MediaRouteProviderWakeReason reason, | 1322 void ExpectWakeReasonBucketCount(MediaRouteProviderWakeReason reason, |
| 1323 int expected_count) { | 1323 int expected_count) { |
| 1324 histogram_tester_.ExpectBucketCount("MediaRouter.Provider.WakeReason", | 1324 histogram_tester_.ExpectBucketCount("MediaRouter.Provider.WakeReason", |
| 1325 static_cast<int>(reason), | 1325 static_cast<int>(reason), |
| 1326 expected_count); | 1326 expected_count); |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 void ExpectVersionBucketCount(MediaRouteProviderVersion version, | 1329 void ExpectVersionBucketCount(MediaRouteProviderVersion version, |
| 1330 int expected_count) { | 1330 int expected_count) { |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 EXPECT_CALL(mock_media_route_provider_, | 1632 EXPECT_CALL(mock_media_route_provider_, |
| 1633 UpdateMediaSinks(mojo::String(MediaSourceForDesktop().id()))) | 1633 UpdateMediaSinks(mojo::String(MediaSourceForDesktop().id()))) |
| 1634 .WillOnce(InvokeWithoutArgs([&run_loop2]() { | 1634 .WillOnce(InvokeWithoutArgs([&run_loop2]() { |
| 1635 run_loop2.Quit(); | 1635 run_loop2.Quit(); |
| 1636 })); | 1636 })); |
| 1637 | 1637 |
| 1638 run_loop2.Run(); | 1638 run_loop2.Run(); |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 } // namespace media_router | 1641 } // namespace media_router |
| OLD | NEW |