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

Unified Diff: net/dns/dns_hosts.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: net/dns/dns_hosts.cc
diff --git a/net/dns/dns_hosts.cc b/net/dns/dns_hosts.cc
index 2fb627e81f7b04653ee1b5906a8f5a7a90ab6ee6..37ce24f88fa2a5b59b85d8df89fe4d8e2dadb4c4 100644
--- a/net/dns/dns_hosts.cc
+++ b/net/dns/dns_hosts.cc
@@ -69,9 +69,7 @@ class HostsParser {
// Fast-forwards the parser to the next line. Should be called if an IP
// address doesn't parse, to avoid wasting time tokenizing hostnames that
// will be ignored.
- void SkipRestOfLine() {
- pos_ = text_.find("\n", pos_);
- }
+ void SkipRestOfLine() { pos_ = text_.find("\n", pos_); }
// Returns whether the last-parsed token is an IP address (true) or a
// hostname (false).
@@ -84,13 +82,9 @@ class HostsParser {
const StringPiece& token() { return token_; }
private:
- void SkipToken() {
- pos_ = text_.find_first_of(" \t\n\r#", pos_);
- }
+ void SkipToken() { pos_ = text_.find_first_of(" \t\n\r#", pos_); }
- void SkipWhitespace() {
- pos_ = text_.find_first_not_of(" \t", pos_);
- }
+ void SkipWhitespace() { pos_ = text_.find_first_not_of(" \t", pos_); }
StringPiece text_;
const char* data_;
@@ -103,8 +97,6 @@ class HostsParser {
DISALLOW_COPY_AND_ASSIGN(HostsParser);
};
-
-
void ParseHosts(const std::string& contents, DnsHosts* dns_hosts) {
CHECK(dns_hosts);
DnsHosts& hosts = *dns_hosts;
@@ -166,4 +158,3 @@ bool ParseHostsFile(const base::FilePath& path, DnsHosts* dns_hosts) {
}
} // namespace net
-

Powered by Google App Engine
This is Rietveld 408576698