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

Unified Diff: shell/command_line_util.cc

Issue 1467263002: Fix URL duplication when SetArgsForURL is called mutliple times. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 1 month 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 | « shell/application_manager/application_manager_unittest.cc ('k') | shell/command_line_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/command_line_util.cc
diff --git a/shell/command_line_util.cc b/shell/command_line_util.cc
index 10d7a1e3adf13acc3b195b380ab4594bcca88a39..dfa2986bf3cd2e3b5c1744c3bff4ae39b752b30f 100644
--- a/shell/command_line_util.cc
+++ b/shell/command_line_util.cc
@@ -21,7 +21,7 @@ GURL GetAppURLAndSetArgs(const std::string& app_url_and_args,
std::vector<std::string> args;
GURL app_url = GetAppURLAndArgs(context, app_url_and_args, &args);
- if (args.size() > 1)
+ if (!args.empty())
context->application_manager()->SetArgsForURL(args, app_url);
return app_url;
}
@@ -58,8 +58,7 @@ GURL GetAppURLAndArgs(Context* context,
LOG(ERROR) << "Error: invalid URL: " << (*args)[0];
return app_url;
}
- if (args->size() == 1)
- args->clear();
+ args->erase(args->begin());
return app_url;
}
« no previous file with comments | « shell/application_manager/application_manager_unittest.cc ('k') | shell/command_line_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698