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

Side by Side Diff: chrome/browser/extensions/api/cast_streaming/performance_test.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 29 matching lines...) Expand all
40 #include "media/cast/test/utility/audio_utility.h" 40 #include "media/cast/test/utility/audio_utility.h"
41 #include "media/cast/test/utility/barcode.h" 41 #include "media/cast/test/utility/barcode.h"
42 #include "media/cast/test/utility/default_config.h" 42 #include "media/cast/test/utility/default_config.h"
43 #include "media/cast/test/utility/in_process_receiver.h" 43 #include "media/cast/test/utility/in_process_receiver.h"
44 #include "media/cast/test/utility/standalone_cast_environment.h" 44 #include "media/cast/test/utility/standalone_cast_environment.h"
45 #include "media/cast/test/utility/udp_proxy.h" 45 #include "media/cast/test/utility/udp_proxy.h"
46 #include "net/base/ip_address.h" 46 #include "net/base/ip_address.h"
47 #include "net/base/ip_endpoint.h" 47 #include "net/base/ip_endpoint.h"
48 #include "net/base/net_errors.h" 48 #include "net/base/net_errors.h"
49 #include "net/base/rand_callback.h" 49 #include "net/base/rand_callback.h"
50 #include "net/log/net_log_source.h"
50 #include "net/udp/udp_server_socket.h" 51 #include "net/udp/udp_server_socket.h"
51 #include "testing/gtest/include/gtest/gtest.h" 52 #include "testing/gtest/include/gtest/gtest.h"
52 #include "testing/perf/perf_test.h" 53 #include "testing/perf/perf_test.h"
53 #include "ui/compositor/compositor_switches.h" 54 #include "ui/compositor/compositor_switches.h"
54 #include "ui/gl/gl_switches.h" 55 #include "ui/gl/gl_switches.h"
55 56
56 namespace { 57 namespace {
57 58
58 const char kExtensionId[] = "ddchlicdkolnonkihahngkmmmjnjlkkf"; 59 const char kExtensionId[] = "ddchlicdkolnonkihahngkmmmjnjlkkf";
59 60
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return 60; 330 return 60;
330 NOTREACHED(); 331 NOTREACHED();
331 return 0; 332 return 0;
332 } 333 }
333 334
334 net::IPEndPoint GetFreeLocalPort() { 335 net::IPEndPoint GetFreeLocalPort() {
335 // Determine a unused UDP port for the in-process receiver to listen on. 336 // Determine a unused UDP port for the in-process receiver to listen on.
336 // Method: Bind a UDP socket on port 0, and then check which port the 337 // Method: Bind a UDP socket on port 0, and then check which port the
337 // operating system assigned to it. 338 // operating system assigned to it.
338 std::unique_ptr<net::UDPServerSocket> receive_socket( 339 std::unique_ptr<net::UDPServerSocket> receive_socket(
339 new net::UDPServerSocket(NULL, net::NetLog::Source())); 340 new net::UDPServerSocket(NULL, net::NetLogSource()));
340 receive_socket->AllowAddressReuse(); 341 receive_socket->AllowAddressReuse();
341 CHECK_EQ(net::OK, receive_socket->Listen( 342 CHECK_EQ(net::OK, receive_socket->Listen(
342 net::IPEndPoint(net::IPAddress::IPv4Localhost(), 0))); 343 net::IPEndPoint(net::IPAddress::IPv4Localhost(), 0)));
343 net::IPEndPoint endpoint; 344 net::IPEndPoint endpoint;
344 CHECK_EQ(net::OK, receive_socket->GetLocalAddress(&endpoint)); 345 CHECK_EQ(net::OK, receive_socket->GetLocalAddress(&endpoint));
345 return endpoint; 346 return endpoint;
346 } 347 }
347 348
348 void SetUp() override { 349 void SetUp() override {
349 EnablePixelOutput(); 350 EnablePixelOutput();
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 CastV2PerformanceTest, 661 CastV2PerformanceTest,
661 testing::Values( 662 testing::Values(
662 kUseGpu | k24fps, 663 kUseGpu | k24fps,
663 kUseGpu | k30fps, 664 kUseGpu | k30fps,
664 kUseGpu | k60fps, 665 kUseGpu | k60fps,
665 kUseGpu | k24fps | kDisableVsync, 666 kUseGpu | k24fps | kDisableVsync,
666 kUseGpu | k30fps | kProxyWifi, 667 kUseGpu | k30fps | kProxyWifi,
667 kUseGpu | k30fps | kProxyBad, 668 kUseGpu | k30fps | kProxyBad,
668 kUseGpu | k30fps | kSlowClock, 669 kUseGpu | k30fps | kSlowClock,
669 kUseGpu | k30fps | kFastClock)); 670 kUseGpu | k30fps | kFastClock));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698