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

Unified Diff: mojo/shell/desktop/mojo_main.cc

Issue 700763002: More Windows build fixes, some tidying in mojo_main (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: .gitignore Created 6 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
Index: mojo/shell/desktop/mojo_main.cc
diff --git a/mojo/shell/desktop/mojo_main.cc b/mojo/shell/desktop/mojo_main.cc
index f5a0bdf4e522b66b1bc0aa00f1508a9f5c16e543..e03aa2a2c51baa2718c09d6ba067880d1ddb7c69 100644
--- a/mojo/shell/desktop/mojo_main.cc
+++ b/mojo/shell/desktop/mojo_main.cc
@@ -35,7 +35,7 @@ void SplitString(const std::string& str, std::vector<std::string>* argv) {
}
#endif
-bool is_empty(const std::string& s) {
+bool IsEmpty(const std::string& s) {
return s.empty();
}
@@ -48,7 +48,7 @@ GURL GetAppURLAndSetArgs(const base::CommandLine::StringType& app_url_and_args,
// SplitString() returns empty strings for extra delimeter characters (' ').
std::vector<std::string> argv;
SplitString(app_url_and_args, &argv);
- argv.erase(std::remove_if(argv.begin(), argv.end(), is_empty), argv.end());
+ argv.erase(std::remove_if(argv.begin(), argv.end(), IsEmpty), argv.end());
if (argv.empty())
return GURL::EmptyGURL();
@@ -101,7 +101,7 @@ bool ConfigureURLMappings(const std::string& mappings,
return true;
}
-bool isArgsFor(const std::string& arg, std::string* value) {
+bool IsArgsFor(const std::string& arg, std::string* value) {
const std::string kArgsForSwitches[] = {
"-" + std::string(switches::kArgsFor),
"--" + std::string(switches::kArgsFor),
@@ -170,9 +170,9 @@ int main(int argc, char** argv) {
// because it can appear more than once. The base::CommandLine class
// collapses multiple occurrences of the same switch.
for (int i = 1; i < argc; i++) {
- std::string argsForValue;
- if (isArgsFor(argv[i], &argsForValue))
- GetAppURLAndSetArgs(argsForValue, &shell_context);
+ std::string args_for_value;
+ if (IsArgsFor(argv[i], &args_for_value))
+ GetAppURLAndSetArgs(args_for_value, &shell_context);
}
message_loop.PostTask(FROM_HERE, base::Bind(RunApps, &shell_context));

Powered by Google App Engine
This is Rietveld 408576698