summaryrefslogtreecommitdiffstats
path: root/net/spdy
diff options
context:
space:
mode:
authorttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 02:24:34 +0000
committerttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 02:24:34 +0000
commitd88ebb58844f25040777e63d1ed52116553721bd (patch)
tree3e4e0a04d252d0ca5639a0d80d61ca665aa8d883 /net/spdy
parent1d011263851099636391a7d6405a7abdfa0a74f8 (diff)
downloadchromium_src-d88ebb58844f25040777e63d1ed52116553721bd.zip
chromium_src-d88ebb58844f25040777e63d1ed52116553721bd.tar.gz
chromium_src-d88ebb58844f25040777e63d1ed52116553721bd.tar.bz2
Remove ConstructSpdyHeader
Remove ConstructSpdyHeader from spdy_test_util_spdy[23], since it's not used anywhere. (I was going to merge it into spdy_test_util_common.) BUG=226192 Review URL: https://chromiumcodereview.appspot.com/15347002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201198 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r--net/spdy/spdy_test_util_spdy2.cc36
-rw-r--r--net/spdy/spdy_test_util_spdy2.h11
-rw-r--r--net/spdy/spdy_test_util_spdy3.cc36
-rw-r--r--net/spdy/spdy_test_util_spdy3.h11
4 files changed, 0 insertions, 94 deletions
diff --git a/net/spdy/spdy_test_util_spdy2.cc b/net/spdy/spdy_test_util_spdy2.cc
index dfd1051..c1a0071 100644
--- a/net/spdy/spdy_test_util_spdy2.cc
+++ b/net/spdy/spdy_test_util_spdy2.cc
@@ -9,7 +9,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
#include "net/cert/mock_cert_verifier.h"
#include "net/http/http_network_session.h"
#include "net/http/http_network_transaction.h"
@@ -68,41 +67,6 @@ SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[],
} // namespace
-int ConstructSpdyHeader(const char* const extra_headers[],
- int extra_header_count,
- char* buffer,
- int buffer_length,
- int index) {
- const char* this_header = NULL;
- const char* this_value = NULL;
- if (!buffer || !buffer_length)
- return 0;
- *buffer = '\0';
- // Sanity check: Non-empty header list.
- DCHECK(NULL != extra_headers) << "NULL extra headers pointer";
- // Sanity check: Index out of range.
- DCHECK((index >= 0) && (index < extra_header_count))
- << "Index " << index
- << " out of range [0, " << extra_header_count << ")";
- this_header = extra_headers[index * 2];
- // Sanity check: Non-empty header.
- if (!*this_header)
- return 0;
- std::string::size_type header_len = strlen(this_header);
- if (!header_len)
- return 0;
- this_value = extra_headers[1 + (index * 2)];
- // Sanity check: Non-empty value.
- if (!*this_value)
- this_value = "";
- int n = base::snprintf(buffer,
- buffer_length,
- "%s: %s\r\n",
- this_header,
- this_value);
- return n;
-}
-
SpdyFrame* ConstructSpdyGet(const char* const url,
bool compressed,
SpdyStreamId stream_id,
diff --git a/net/spdy/spdy_test_util_spdy2.h b/net/spdy/spdy_test_util_spdy2.h
index 3630b13..09ec7c0 100644
--- a/net/spdy/spdy_test_util_spdy2.h
+++ b/net/spdy/spdy_test_util_spdy2.h
@@ -24,17 +24,6 @@ namespace test_spdy2 {
// Can't find a function you're looking for? ttuttle is migrating functions
// from here into methods in the SpdyTestUtil class in spdy_test_common.h.
-// Construct a single SPDY header entry, for validation.
-// |extra_headers| are the extra header-value pairs.
-// |buffer| is the buffer we're filling in.
-// |index| is the index of the header we want.
-// Returns the number of bytes written into |buffer|.
-int ConstructSpdyHeader(const char* const extra_headers[],
- int extra_header_count,
- char* buffer,
- int buffer_length,
- int index);
-
// Constructs a standard SPDY GET SYN frame, optionally compressed
// for the url |url|.
// |extra_headers| are the extra header-value pairs, which typically
diff --git a/net/spdy/spdy_test_util_spdy3.cc b/net/spdy/spdy_test_util_spdy3.cc
index e7416b0..0b465eb 100644
--- a/net/spdy/spdy_test_util_spdy3.cc
+++ b/net/spdy/spdy_test_util_spdy3.cc
@@ -10,7 +10,6 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
#include "net/cert/mock_cert_verifier.h"
#include "net/spdy/buffered_spdy_framer.h"
#include "net/spdy/spdy_http_utils.h"
@@ -117,41 +116,6 @@ SpdyFrame* ConstructSpdyControlFrame(const char* const extra_headers[],
} // namespace
-int ConstructSpdyHeader(const char* const extra_headers[],
- int extra_header_count,
- char* buffer,
- int buffer_length,
- int index) {
- const char* this_header = NULL;
- const char* this_value = NULL;
- if (!buffer || !buffer_length)
- return 0;
- *buffer = '\0';
- // Sanity check: Non-empty header list.
- DCHECK(NULL != extra_headers) << "NULL extra headers pointer";
- // Sanity check: Index out of range.
- DCHECK((index >= 0) && (index < extra_header_count))
- << "Index " << index
- << " out of range [0, " << extra_header_count << ")";
- this_header = extra_headers[index * 2];
- // Sanity check: Non-empty header.
- if (!*this_header)
- return 0;
- std::string::size_type header_len = strlen(this_header);
- if (!header_len)
- return 0;
- this_value = extra_headers[1 + (index * 2)];
- // Sanity check: Non-empty value.
- if (!*this_value)
- this_value = "";
- int n = base::snprintf(buffer,
- buffer_length,
- "%s: %s\r\n",
- this_header,
- this_value);
- return n;
-}
-
SpdyFrame* ConstructSpdyGet(const char* const url,
bool compressed,
SpdyStreamId stream_id,
diff --git a/net/spdy/spdy_test_util_spdy3.h b/net/spdy/spdy_test_util_spdy3.h
index b8dbe88..1da40c3 100644
--- a/net/spdy/spdy_test_util_spdy3.h
+++ b/net/spdy/spdy_test_util_spdy3.h
@@ -28,17 +28,6 @@ namespace test_spdy3 {
// Can't find a function you're looking for? ttuttle is migrating functions
// from here into methods in the SpdyTestUtil class in spdy_test_common.h.
-// Construct a single SPDY header entry, for validation.
-// |extra_headers| are the extra header-value pairs.
-// |buffer| is the buffer we're filling in.
-// |index| is the index of the header we want.
-// Returns the number of bytes written into |buffer|.
-int ConstructSpdyHeader(const char* const extra_headers[],
- int extra_header_count,
- char* buffer,
- int buffer_length,
- int index);
-
// Constructs a standard SPDY GET SYN frame, optionally compressed
// for the url |url|.
// |extra_headers| are the extra header-value pairs, which typically