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

Unified Diff: net/tools/balsa/balsa_frame.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month 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/test/python_utils.cc ('k') | net/tools/quic/quic_time_wait_list_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/balsa/balsa_frame.cc
diff --git a/net/tools/balsa/balsa_frame.cc b/net/tools/balsa/balsa_frame.cc
index 1103ef1abfd2f4b2590297ac38d586382a3f417f..96e91935597b734b39088d26bd10a8f6614dba25 100644
--- a/net/tools/balsa/balsa_frame.cc
+++ b/net/tools/balsa/balsa_frame.cc
@@ -745,44 +745,11 @@ void ProcessChunkExtensionsManual(base::StringPiece all_extensions,
}
}
-// TODO(phython): Fix this function to properly deal with quoted values.
-// E.g. ";;foo", "\";;\"", or \"aa;
-// The last example, the semi-colon is a separator between extensions.
-void ProcessChunkExtensionsGoogle3(const char* input, size_t size,
- BalsaHeaders* extensions) {
- std::vector<base::StringPiece> key_values;
- SplitStringPieceToVector(base::StringPiece(input, size), ";",
- &key_values, true);
- for (unsigned int i = 0; i < key_values.size(); ++i) {
- base::StringPiece key = key_values[i].substr(0, key_values[i].find('='));
- base::StringPiece value;
- if (key.length() < key_values[i].length()) {
- value = key_values[i].substr(key.length() + 1);
- // Remove any leading and trailing whitespace.
- StringPieceUtils::RemoveWhitespaceContext(&value);
-
- // Strip quotation marks if they exist.
- if (!value.empty() && value[0] == '"')
- value.remove_prefix(1);
- if (!value.empty() && value[value.length() - 1] == '"')
- value.remove_suffix(1);
- }
-
- // Strip the key whitespace after checking that there is a value.
- StringPieceUtils::RemoveWhitespaceContext(&key);
- extensions->AppendHeader(key, value);
- }
-}
-
} // anonymous namespace
void BalsaFrame::ProcessChunkExtensions(const char* input, size_t size,
BalsaHeaders* extensions) {
-#if 0
- ProcessChunkExtensionsGoogle3(input, size, extensions);
-#else
ProcessChunkExtensionsManual(base::StringPiece(input, size), extensions);
-#endif
}
void BalsaFrame::ProcessHeaderLines() {
« no previous file with comments | « net/test/python_utils.cc ('k') | net/tools/quic/quic_time_wait_list_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698