Index: net/dns/dns_test_util.cc |
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc |
index 01acb346fa9d8f940a90543f49378e20e8e295d5..be2991a12bc63c82bce1eae96dfcf7880e7759a8 100644 |
--- a/net/dns/dns_test_util.cc |
+++ b/net/dns/dns_test_util.cc |
@@ -50,8 +50,7 @@ class MockTransaction : public DnsTransaction, |
// Find the relevant rule which matches |qtype| and prefix of |hostname|. |
for (size_t i = 0; i < rules.size(); ++i) { |
const std::string& prefix = rules[i].prefix; |
- if ((rules[i].qtype == qtype) && |
- (hostname.size() >= prefix.size()) && |
+ if ((rules[i].qtype == qtype) && (hostname.size() >= prefix.size()) && |
(hostname.compare(0, prefix.size(), prefix) == 0)) { |
result_ = rules[i].result; |
delayed_ = rules[i].delay; |
@@ -60,13 +59,9 @@ class MockTransaction : public DnsTransaction, |
} |
} |
- virtual const std::string& GetHostname() const OVERRIDE { |
- return hostname_; |
- } |
+ virtual const std::string& GetHostname() const OVERRIDE { return hostname_; } |
- virtual uint16 GetType() const OVERRIDE { |
- return qtype_; |
- } |
+ virtual uint16 GetType() const OVERRIDE { return qtype_; } |
virtual void Start() OVERRIDE { |
EXPECT_FALSE(started_); |
@@ -110,8 +105,9 @@ class MockTransaction : public DnsTransaction, |
const uint32 kTTL = 86400; // One day. |
// Size of RDATA which is a IPv4 or IPv6 address. |
- size_t rdata_size = qtype_ == net::dns_protocol::kTypeA ? |
- net::kIPv4AddressSize : net::kIPv6AddressSize; |
+ size_t rdata_size = qtype_ == net::dns_protocol::kTypeA |
+ ? net::kIPv4AddressSize |
+ : net::kIPv6AddressSize; |
// 12 is the sum of sizes of the compressed name reference, TYPE, |
// CLASS, TTL and RDLENGTH. |
@@ -126,11 +122,11 @@ class MockTransaction : public DnsTransaction, |
writer.WriteU32(kTTL); |
writer.WriteU16(rdata_size); |
if (qtype_ == net::dns_protocol::kTypeA) { |
- char kIPv4Loopback[] = { 0x7f, 0, 0, 1 }; |
+ char kIPv4Loopback[] = {0x7f, 0, 0, 1}; |
writer.WriteBytes(kIPv4Loopback, sizeof(kIPv4Loopback)); |
} else { |
- char kIPv6Loopback[] = { 0, 0, 0, 0, 0, 0, 0, 0, |
- 0, 0, 0, 0, 0, 0, 0, 1 }; |
+ char kIPv6Loopback[] = {0, 0, 0, 0, 0, 0, 0, 0, |
+ 0, 0, 0, 0, 0, 0, 0, 1}; |
writer.WriteBytes(kIPv6Loopback, sizeof(kIPv6Loopback)); |
} |
nbytes += answer_size; |
@@ -184,7 +180,8 @@ class MockTransactionFactory : public DnsTransactionFactory { |
DelayedTransactionList old_delayed_transactions; |
old_delayed_transactions.swap(delayed_transactions_); |
for (DelayedTransactionList::iterator it = old_delayed_transactions.begin(); |
- it != old_delayed_transactions.end(); ++it) { |
+ it != old_delayed_transactions.end(); |
+ ++it) { |
if (it->get()) |
(*it)->FinishDelayedTransaction(); |
} |
@@ -199,12 +196,13 @@ class MockTransactionFactory : public DnsTransactionFactory { |
MockDnsClient::MockDnsClient(const DnsConfig& config, |
const MockDnsClientRuleList& rules) |
- : config_(config), |
- factory_(new MockTransactionFactory(rules)), |
- address_sorter_(new MockAddressSorter()) { |
+ : config_(config), |
+ factory_(new MockTransactionFactory(rules)), |
+ address_sorter_(new MockAddressSorter()) { |
} |
-MockDnsClient::~MockDnsClient() {} |
+MockDnsClient::~MockDnsClient() { |
+} |
void MockDnsClient::SetConfig(const DnsConfig& config) { |
config_ = config; |