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

Unified Diff: net/tools/dump_cache/upgrade.cc

Issue 153001: Fix 15 coverity complaints.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | « net/tools/dump_cache/dump_files.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/upgrade.cc
===================================================================
--- net/tools/dump_cache/upgrade.cc (revision 19697)
+++ net/tools/dump_cache/upgrade.cc (working copy)
@@ -23,7 +23,7 @@
#define DEBUGMSG(...) { printf(__VA_ARGS__); }
#endif
-HANDLE OpenServer(const std::wstring pipe_number) {
+HANDLE OpenServer(const std::wstring& pipe_number) {
std::wstring pipe_name(kPipePrefix);
pipe_name.append(pipe_number);
return CreateFile(pipe_name.c_str(), GENERIC_READ | GENERIC_WRITE, 0, NULL,
@@ -760,7 +760,7 @@
}
// This is the controller process for an upgrade operation.
-int Upgrade(const std::wstring output_path, HANDLE pipe) {
+int Upgrade(const std::wstring& output_path, HANDLE pipe) {
MessageLoop loop(MessageLoop::TYPE_IO);
disk_cache::BackendImpl cache(output_path);
if (!cache.Init()) {
@@ -779,7 +779,7 @@
}
// This process will only execute commands from the controller.
-int RunSlave(const std::wstring input_path, const std::wstring pipe_number) {
+int RunSlave(const std::wstring& input_path, const std::wstring& pipe_number) {
MessageLoop loop(MessageLoop::TYPE_IO);
ScopedHandle pipe(OpenServer(pipe_number));
« no previous file with comments | « net/tools/dump_cache/dump_files.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698