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

Unified Diff: net/http/transport_security_persister.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/http/transport_security_persister.cc
diff --git a/net/http/transport_security_persister.cc b/net/http/transport_security_persister.cc
index 04de296c82f002b85c00c0b96e8aee99f850ea7b..9bad8ac754f5e1f67620c552dff93b2623affba7 100644
--- a/net/http/transport_security_persister.cc
+++ b/net/http/transport_security_persister.cc
@@ -91,7 +91,6 @@ std::string LoadState(const base::FilePath& path) {
} // namespace
-
namespace net {
TransportSecurityPersister::TransportSecurityPersister(
@@ -124,8 +123,7 @@ TransportSecurityPersister::~TransportSecurityPersister() {
transport_security_state_->SetDelegate(NULL);
}
-void TransportSecurityPersister::StateIsDirty(
- TransportSecurityState* state) {
+void TransportSecurityPersister::StateIsDirty(TransportSecurityState* state) {
DCHECK(foreground_runner_->RunsTasksOnCurrentThread());
DCHECK_EQ(transport_security_state_, state);
@@ -176,9 +174,8 @@ bool TransportSecurityPersister::SerializeData(std::string* output) {
toplevel.Set(HashedDomainToExternalString(hostname), serialized);
}
- base::JSONWriter::WriteWithOptions(&toplevel,
- base::JSONWriter::OPTIONS_PRETTY_PRINT,
- output);
+ base::JSONWriter::WriteWithOptions(
+ &toplevel, base::JSONWriter::OPTIONS_PRETTY_PRINT, output);
return true;
}
@@ -202,8 +199,8 @@ bool TransportSecurityPersister::Deserialize(const std::string& serialized,
const base::Time current_time(base::Time::Now());
bool dirtied = false;
- for (base::DictionaryValue::Iterator i(*dict_value);
- !i.IsAtEnd(); i.Advance()) {
+ for (base::DictionaryValue::Iterator i(*dict_value); !i.IsAtEnd();
+ i.Advance()) {
const base::DictionaryValue* parsed = NULL;
if (!i.value().GetAsDictionary(&parsed)) {
LOG(WARNING) << "Could not parse entry " << i.key() << "; skipping entry";
@@ -219,8 +216,8 @@ bool TransportSecurityPersister::Deserialize(const std::string& serialized,
// kPkpIncludeSubdomains. Parse at least one of these properties,
// preferably the new ones.
bool include_subdomains = false;
- bool parsed_include_subdomains = parsed->GetBoolean(kIncludeSubdomains,
- &include_subdomains);
+ bool parsed_include_subdomains =
+ parsed->GetBoolean(kIncludeSubdomains, &include_subdomains);
domain_state.sts_include_subdomains = include_subdomains;
domain_state.pkp_include_subdomains = include_subdomains;
if (parsed->GetBoolean(kStsIncludeSubdomains, &include_subdomains)) {
@@ -232,8 +229,7 @@ bool TransportSecurityPersister::Deserialize(const std::string& serialized,
parsed_include_subdomains = true;
}
- if (!parsed_include_subdomains ||
- !parsed->GetString(kMode, &mode_string) ||
+ if (!parsed_include_subdomains || !parsed->GetString(kMode, &mode_string) ||
!parsed->GetDouble(kExpiry, &expiry)) {
LOG(WARNING) << "Could not parse some elements of entry " << i.key()
<< "; skipping entry";
@@ -241,8 +237,7 @@ bool TransportSecurityPersister::Deserialize(const std::string& serialized,
}
// Don't fail if this key is not present.
- parsed->GetDouble(kDynamicSPKIHashesExpiry,
- &dynamic_spki_hashes_expiry);
+ parsed->GetDouble(kDynamicSPKIHashesExpiry, &dynamic_spki_hashes_expiry);
const base::ListValue* pins_list = NULL;
if (parsed->GetList(kDynamicSPKIHashes, &pins_list))

Powered by Google App Engine
This is Rietveld 408576698