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

Unified Diff: net/http/http_content_disposition.cc

Issue 12087091: Move string tokenizer to base/strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort Created 7 years, 11 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
« no previous file with comments | « net/http/http_auth.cc ('k') | net/http/http_security_headers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_content_disposition.cc
diff --git a/net/http/http_content_disposition.cc b/net/http/http_content_disposition.cc
index 734b1dac012ccc7c7a106b5fb1764ba5b79b0fac..20c7479dff83a8216b074cfc822b8e407c4694bb 100644
--- a/net/http/http_content_disposition.cc
+++ b/net/http/http_content_disposition.cc
@@ -8,6 +8,7 @@
#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
#include "base/string_util.h"
+#include "base/strings/string_tokenizer.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "net/base/net_util.h"
@@ -131,7 +132,7 @@ bool DecodeWord(const std::string& encoded_word,
*is_rfc2047 = true;
int part_index = 0;
std::string charset;
- StringTokenizer t(encoded_word, "?");
+ base::StringTokenizer t(encoded_word, "?");
RFC2047EncodingType enc_type = Q_ENCODING;
while (*is_rfc2047 && t.GetNext()) {
std::string part = t.token();
@@ -236,8 +237,8 @@ bool DecodeFilenameValue(const std::string& input,
bool is_previous_token_rfc2047 = true;
// Tokenize with whitespace characters.
- StringTokenizer t(input, " \t\n\r");
- t.set_options(StringTokenizer::RETURN_DELIMS);
+ base::StringTokenizer t(input, " \t\n\r");
+ t.set_options(base::StringTokenizer::RETURN_DELIMS);
while (t.GetNext()) {
if (t.token_is_delim()) {
// If the previous non-delimeter token is not RFC2047-encoded,
@@ -269,8 +270,8 @@ bool DecodeFilenameValue(const std::string& input,
bool ParseExtValueComponents(const std::string& input,
std::string* charset,
std::string* value_chars) {
- StringTokenizer t(input, "'");
- t.set_options(StringTokenizer::RETURN_DELIMS);
+ base::StringTokenizer t(input, "'");
+ t.set_options(base::StringTokenizer::RETURN_DELIMS);
std::string temp_charset;
std::string temp_value;
int numDelimsSeen = 0;
« no previous file with comments | « net/http/http_auth.cc ('k') | net/http/http_security_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698