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

Unified Diff: webrtc/test/testsupport/fileutils.h

Issue 2685583009: Make functions in fileutils.h use "const std::string&". (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/test/testsupport/fileutils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/testsupport/fileutils.h
diff --git a/webrtc/test/testsupport/fileutils.h b/webrtc/test/testsupport/fileutils.h
index 2467f0c8e54a8717f824a58df8c9bf1c2fbcbcc6..1a5f9bbb56cd7f40f214039107c63f9cf50f17ee 100644
--- a/webrtc/test/testsupport/fileutils.h
+++ b/webrtc/test/testsupport/fileutils.h
@@ -58,7 +58,8 @@ std::string TempFilename(const std::string &dir, const std::string &prefix);
// If a directory path is prepended to the filename, a subdirectory
// hierarchy reflecting that path is assumed to be present.
// extension - File extension, without the dot, i.e. "bmp" or "yuv".
-std::string ResourcePath(std::string name, std::string extension);
+std::string ResourcePath(const std::string& name,
+ const std::string& extension);
// Gets the current working directory for the executing program.
// Returns "./" if for some reason it is not possible to find the working
@@ -68,14 +69,14 @@ std::string WorkingDir();
// Creates a directory if it not already exists.
// Returns true if successful. Will print an error message to stderr and return
// false if a file with the same name already exists.
-bool CreateDir(std::string directory_name);
+bool CreateDir(const std::string& directory_name);
// Checks if a file exists.
-bool FileExists(std::string& file_name);
+bool FileExists(const std::string& file_name);
// File size of the supplied file in bytes. Will return 0 if the file is
// empty or if the file does not exist/is readable.
-size_t GetFileSize(std::string filename);
+size_t GetFileSize(const std::string& filename);
// Sets the executable path, i.e. the path to the executable that is being used
// when launching it. This is usually the path relative to the working directory
« no previous file with comments | « no previous file | webrtc/test/testsupport/fileutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698