[clang-tidy] Apply modernize-use-auto in /net
This change applies clang-tidy's modernize-use-auto [1] in /net.
This change does not rewrite new and cast expressions.
Reproduction steps:
- run clang-tidy's modernize-use-auto
- run git cl format
- manually remove unused typedefs due to -Wunused-local-typedef error
in //net/test/url_request/url_request_slow_download_job.cc.
[1] https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
This CL was uploaded by git cl split.
[email protected]
Bug: 890902
Change-Id: Idf97f430cc571be05d1b69615d43ff34ef1ce64d
Reviewed-on: https://chromium-review.googlesource.com/c/1257843
Reviewed-by: Eric Roman <[email protected]>
Commit-Queue: Jan Wilken Dörrie <[email protected]>
Cr-Commit-Position: refs/heads/master@{#597036}
diff --git a/net/proxy_resolution/proxy_config_service_linux.cc b/net/proxy_resolution/proxy_config_service_linux.cc
index 93514db1..239b86c 100644
--- a/net/proxy_resolution/proxy_config_service_linux.cc
+++ b/net/proxy_resolution/proxy_config_service_linux.cc
@@ -646,7 +646,7 @@
}
bool GetString(StringSetting key, std::string* result) override {
- string_map_type::iterator it = string_table_.find(key);
+ auto it = string_table_.find(key);
if (it == string_table_.end())
return false;
*result = it->second;
@@ -662,7 +662,7 @@
}
bool GetStringList(StringListSetting key,
std::vector<std::string>* result) override {
- strings_map_type::iterator it = strings_table_.find(key);
+ auto it = strings_table_.find(key);
if (it == strings_table_.end())
return false;
*result = it->second;
@@ -774,7 +774,7 @@
}
void ResolveIndirect(StringSetting key) {
- string_map_type::iterator it = string_table_.find(key);
+ auto it = string_table_.find(key);
if (it != string_table_.end()) {
std::string value;
if (env_var_getter_->GetVar(it->second.c_str(), &value))
@@ -785,7 +785,7 @@
}
void ResolveIndirectList(StringListSetting key) {
- strings_map_type::iterator it = strings_table_.find(key);
+ auto it = strings_table_.find(key);
if (it != strings_table_.end()) {
std::string value;
if (!it->second.empty() &&