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

Unified Diff: net/cert/pem_tokenizer.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/cert/pem_tokenizer.cc
diff --git a/net/cert/pem_tokenizer.cc b/net/cert/pem_tokenizer.cc
index 6721462e41396fc158c4f827d6da640875551de4..63f59987cbbd0162acea20fab2a0659017d73bda 100644
--- a/net/cert/pem_tokenizer.cc
+++ b/net/cert/pem_tokenizer.cc
@@ -61,10 +61,10 @@ bool PEMTokenizer::GetNext() {
pos_ = footer_pos + it->footer.size();
block_type_ = it->type;
- StringPiece encoded = str_.substr(data_begin,
- footer_pos - data_begin);
- if (!base::Base64Decode(base::CollapseWhitespaceASCII(encoded.as_string(),
- true), &data_)) {
+ StringPiece encoded = str_.substr(data_begin, footer_pos - data_begin);
+ if (!base::Base64Decode(
+ base::CollapseWhitespaceASCII(encoded.as_string(), true),
+ &data_)) {
// The most likely cause for a decode failure is a datatype that
// includes PEM headers, which are not supported.
break;
@@ -84,16 +84,17 @@ bool PEMTokenizer::GetNext() {
return false;
}
-void PEMTokenizer::Init(
- const StringPiece& str,
- const std::vector<std::string>& allowed_block_types) {
+void PEMTokenizer::Init(const StringPiece& str,
+ const std::vector<std::string>& allowed_block_types) {
str_ = str;
pos_ = 0;
// Construct PEM header/footer strings for all the accepted types, to
// reduce parsing later.
for (std::vector<std::string>::const_iterator it =
- allowed_block_types.begin(); it != allowed_block_types.end(); ++it) {
+ allowed_block_types.begin();
+ it != allowed_block_types.end();
+ ++it) {
PEMType allowed_type;
allowed_type.type = *it;
allowed_type.header = base::StringPrintf(kPEMBeginBlock, it->c_str());

Powered by Google App Engine
This is Rietveld 408576698