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

Side by Side Diff: media/cast/test/receiver.cc

Issue 1360523002: Cleanup: Pass std::string as const reference from media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <algorithm> 5 #include <algorithm>
6 #include <climits> 6 #include <climits>
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <cstdio> 8 #include <cstdio>
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void GetPorts(uint16* tx_port, uint16* rx_port) { 68 void GetPorts(uint16* tx_port, uint16* rx_port) {
69 test::InputBuilder tx_input( 69 test::InputBuilder tx_input(
70 "Enter send port.", DEFAULT_SEND_PORT, 1, 65535); 70 "Enter send port.", DEFAULT_SEND_PORT, 1, 65535);
71 *tx_port = static_cast<uint16>(tx_input.GetIntInput()); 71 *tx_port = static_cast<uint16>(tx_input.GetIntInput());
72 72
73 test::InputBuilder rx_input( 73 test::InputBuilder rx_input(
74 "Enter receive port.", DEFAULT_RECEIVE_PORT, 1, 65535); 74 "Enter receive port.", DEFAULT_RECEIVE_PORT, 1, 65535);
75 *rx_port = static_cast<uint16>(rx_input.GetIntInput()); 75 *rx_port = static_cast<uint16>(rx_input.GetIntInput());
76 } 76 }
77 77
78 std::string GetIpAddress(const std::string display_text) { 78 std::string GetIpAddress(const std::string& display_text) {
79 test::InputBuilder input(display_text, DEFAULT_SEND_IP, INT_MIN, INT_MAX); 79 test::InputBuilder input(display_text, DEFAULT_SEND_IP, INT_MIN, INT_MAX);
80 std::string ip_address = input.GetStringInput(); 80 std::string ip_address = input.GetStringInput();
81 // Ensure IP address is either the default value or in correct form. 81 // Ensure IP address is either the default value or in correct form.
82 while (ip_address != DEFAULT_SEND_IP && 82 while (ip_address != DEFAULT_SEND_IP &&
83 std::count(ip_address.begin(), ip_address.end(), '.') != 3) { 83 std::count(ip_address.begin(), ip_address.end(), '.') != 3) {
84 ip_address = input.GetStringInput(); 84 ip_address = input.GetStringInput();
85 } 85 }
86 return ip_address; 86 return ip_address;
87 } 87 }
88 88
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 audio_config, 591 audio_config,
592 video_config, 592 video_config,
593 window_width, 593 window_width,
594 window_height); 594 window_height);
595 player.Start(); 595 player.Start();
596 596
597 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM). 597 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM).
598 NOTREACHED(); 598 NOTREACHED();
599 return 0; 599 return 0;
600 } 600 }
OLDNEW
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698