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

Side by Side Diff: net/base/pem_tokenizer.cc

Issue 3390026: net: Append base:: in the StringPrintf calls. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix include order Created 10 years, 2 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 unified diff | Download patch
« no previous file with comments | « net/base/net_util_unittest.cc ('k') | net/disk_cache/backend_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/pem_tokenizer.h" 5 #include "net/base/pem_tokenizer.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/stringprintf.h"
9 10
10 namespace { 11 namespace {
11 12
12 const char kPEMSearchBlock[] = "-----BEGIN "; 13 const char kPEMSearchBlock[] = "-----BEGIN ";
13 const char kPEMBeginBlock[] = "-----BEGIN %s-----"; 14 const char kPEMBeginBlock[] = "-----BEGIN %s-----";
14 const char kPEMEndBlock[] = "-----END %s-----"; 15 const char kPEMEndBlock[] = "-----END %s-----";
15 16
16 } // namespace 17 } // namespace
17 18
18 namespace net { 19 namespace net {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const std::vector<std::string>& allowed_block_types) { 89 const std::vector<std::string>& allowed_block_types) {
89 str_ = str; 90 str_ = str;
90 pos_ = 0; 91 pos_ = 0;
91 92
92 // Construct PEM header/footer strings for all the accepted types, to 93 // Construct PEM header/footer strings for all the accepted types, to
93 // reduce parsing later. 94 // reduce parsing later.
94 for (std::vector<std::string>::const_iterator it = 95 for (std::vector<std::string>::const_iterator it =
95 allowed_block_types.begin(); it != allowed_block_types.end(); ++it) { 96 allowed_block_types.begin(); it != allowed_block_types.end(); ++it) {
96 PEMType allowed_type; 97 PEMType allowed_type;
97 allowed_type.type = *it; 98 allowed_type.type = *it;
98 allowed_type.header = StringPrintf(kPEMBeginBlock, it->c_str()); 99 allowed_type.header = base::StringPrintf(kPEMBeginBlock, it->c_str());
99 allowed_type.footer = StringPrintf(kPEMEndBlock, it->c_str()); 100 allowed_type.footer = base::StringPrintf(kPEMEndBlock, it->c_str());
100 block_types_.push_back(allowed_type); 101 block_types_.push_back(allowed_type);
101 } 102 }
102 } 103 }
103 104
104 } // namespace net 105 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_util_unittest.cc ('k') | net/disk_cache/backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698