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

Side by Side Diff: media/cast/test/utility/input_builder.h

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/sender.cc ('k') | media/cast/test/utility/input_builder.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 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 #ifndef MEDIA_CAST_TEST_UTILITY_INPUT_BUILDER_ 5 #ifndef MEDIA_CAST_TEST_UTILITY_INPUT_BUILDER_
6 #define MEDIA_CAST_TEST_UTILITY_INPUT_BUILDER_ 6 #define MEDIA_CAST_TEST_UTILITY_INPUT_BUILDER_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace media { 10 namespace media {
(...skipping 15 matching lines...) Expand all
26 // Ask the user for input, reads input from the input source and returns 26 // Ask the user for input, reads input from the input source and returns
27 // the answer. This method will keep asking the user until a correct answer 27 // the answer. This method will keep asking the user until a correct answer
28 // is returned and is thereby guaranteed to return a response that is 28 // is returned and is thereby guaranteed to return a response that is
29 // acceptable within the predefined range. 29 // acceptable within the predefined range.
30 // Input will be returned in either string or int format, base on the function 30 // Input will be returned in either string or int format, base on the function
31 // called. 31 // called.
32 std::string GetStringInput() const; 32 std::string GetStringInput() const;
33 int GetIntInput() const; 33 int GetIntInput() const;
34 34
35 private: 35 private:
36 bool ValidateInput(const std::string input) const; 36 bool ValidateInput(const std::string& input) const;
37 37
38 const std::string title_; 38 const std::string title_;
39 const std::string default_value_; 39 const std::string default_value_;
40 // Low and high range values for input validation. 40 // Low and high range values for input validation.
41 const int low_range_; 41 const int low_range_;
42 const int high_range_; 42 const int high_range_;
43 }; 43 };
44 44
45 } // namespace test 45 } // namespace test
46 } // namespace cast 46 } // namespace cast
47 } // namespace media 47 } // namespace media
48 48
49 #endif // MEDIA_CAST_TEST_UTILITY_INPUT_BUILDER_ 49 #endif // MEDIA_CAST_TEST_UTILITY_INPUT_BUILDER_
OLDNEW
« no previous file with comments | « media/cast/test/sender.cc ('k') | media/cast/test/utility/input_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698