Remove unneeded empty checks
This commit is contained in:
parent
04fa85f67f
commit
381f55b3cb
2 changed files with 8 additions and 15 deletions
|
@ -197,10 +197,9 @@ void AtomContentClient::AddServiceWorkerSchemes(
|
|||
std::vector<std::string> schemes;
|
||||
ConvertStringWithSeparatorToVector(&schemes, ",",
|
||||
switches::kRegisterServiceWorkerSchemes);
|
||||
if (!schemes.empty()) {
|
||||
for (const std::string& scheme : schemes)
|
||||
service_worker_schemes->insert(scheme);
|
||||
}
|
||||
|
||||
service_worker_schemes->insert(url::kFileScheme);
|
||||
}
|
||||
|
||||
|
@ -210,12 +209,9 @@ void AtomContentClient::AddSecureSchemesAndOrigins(
|
|||
std::vector<std::string> schemes;
|
||||
ConvertStringWithSeparatorToVector(&schemes, ",",
|
||||
switches::kSecureSchemes);
|
||||
if (!schemes.empty()) {
|
||||
for (const std::string& scheme : schemes) {
|
||||
for (const std::string& scheme : schemes)
|
||||
secure_schemes->insert(scheme);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace atom
|
||||
|
|
|
@ -124,11 +124,8 @@ bool IsDevToolsExtension(content::RenderFrame* render_frame) {
|
|||
std::vector<std::string> ParseSchemesCLISwitch(const char* switch_name) {
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
std::string custom_schemes = command_line->GetSwitchValueASCII(switch_name);
|
||||
if (!custom_schemes.empty()) {
|
||||
return base::SplitString(custom_schemes, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
||||
}
|
||||
return std::vector<std::string>();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue