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

Unified Diff: net/http/http_security_headers.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/http_security_headers.cc
diff --git a/net/http/http_security_headers.cc b/net/http/http_security_headers.cc
index 8d0c1465307f8adb5da5eb61907e2a0b8b2d9da6..d53b4fe7a9dfcae589601da0829bcdcd73f96c71 100644
--- a/net/http/http_security_headers.cc
+++ b/net/http/http_security_headers.cc
@@ -48,11 +48,9 @@ bool MaxAgeToInt(std::string::const_iterator begin,
// |from_cert_chain|. Such an SPKI hash is called a "backup pin".
bool IsBackupPinPresent(const HashValueVector& pins,
const HashValueVector& from_cert_chain) {
- for (HashValueVector::const_iterator i = pins.begin(); i != pins.end();
- ++i) {
- HashValueVector::const_iterator j =
- std::find_if(from_cert_chain.begin(), from_cert_chain.end(),
- HashValuesEqual(*i));
+ for (HashValueVector::const_iterator i = pins.begin(); i != pins.end(); ++i) {
+ HashValueVector::const_iterator j = std::find_if(
+ from_cert_chain.begin(), from_cert_chain.end(), HashValuesEqual(*i));
if (j == from_cert_chain.end())
return true;
}
@@ -62,8 +60,7 @@ bool IsBackupPinPresent(const HashValueVector& pins,
// Returns true if the intersection of |a| and |b| is not empty. If either
// |a| or |b| is empty, returns false.
-bool HashesIntersect(const HashValueVector& a,
- const HashValueVector& b) {
+bool HashesIntersect(const HashValueVector& a, const HashValueVector& b) {
for (HashValueVector::const_iterator i = a.begin(); i != a.end(); ++i) {
HashValueVector::const_iterator j =
std::find_if(b.begin(), b.end(), HashValuesEqual(*i));
@@ -122,7 +119,7 @@ bool ParseAndAppendPin(const std::string& value,
std::string decoded;
if (unquoted.empty())
- return false;
+ return false;
if (!base::Base64Decode(unquoted, &decoded))
return false;
@@ -295,8 +292,8 @@ bool ParseHPKPHeader(const std::string& value,
if (LowerCaseEqualsASCII(equals.first, "max-age")) {
if (equals.second.empty() ||
- !MaxAgeToInt(equals.second.begin(), equals.second.end(),
- &max_age_candidate)) {
+ !MaxAgeToInt(
+ equals.second.begin(), equals.second.end(), &max_age_candidate)) {
return false;
}
parsed_max_age = true;
@@ -323,12 +320,12 @@ bool ParseHPKPHeader(const std::string& value,
*max_age = base::TimeDelta::FromSeconds(max_age_candidate);
*include_subdomains = include_subdomains_candidate;
- for (HashValueVector::const_iterator i = pins.begin();
- i != pins.end(); ++i) {
+ for (HashValueVector::const_iterator i = pins.begin(); i != pins.end(); ++i) {
bool found = false;
for (HashValueVector::const_iterator j = hashes->begin();
- j != hashes->end(); ++j) {
+ j != hashes->end();
+ ++j) {
if (j->Equals(*i)) {
found = true;
break;

Powered by Google App Engine
This is Rietveld 408576698