diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-01 20:40:56 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-01 20:40:56 +0000 |
commit | 5d0402933e1079dbf1952dd13733e285d6587fb4 (patch) | |
tree | 4b35fbcb28268d240c4c124825b145dd620bc9b7 | |
parent | caaf2487ad7e1c2fa6de439359f52334b5d5015d (diff) | |
download | chromium_src-5d0402933e1079dbf1952dd13733e285d6587fb4.zip chromium_src-5d0402933e1079dbf1952dd13733e285d6587fb4.tar.gz chromium_src-5d0402933e1079dbf1952dd13733e285d6587fb4.tar.bz2 |
Remove unused webkit_glue::RemoveFormDataFromHistoryState function.
BUG=237243
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/14789005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197706 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/glue_serialize.cc | 13 | ||||
-rw-r--r-- | webkit/glue/glue_serialize.h | 4 | ||||
-rw-r--r-- | webkit/glue/glue_serialize_unittest.cc | 25 |
3 files changed, 0 insertions, 42 deletions
diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc index f20d848..e7d1fa1 100644 --- a/webkit/glue/glue_serialize.cc +++ b/webkit/glue/glue_serialize.cc @@ -564,19 +564,6 @@ int HistoryItemCurrentVersion() { return kVersion; } -std::string RemoveFormDataFromHistoryState(const std::string& content_state) { - // TODO(darin): We should avoid using the WebKit API here, so that we do not - // need to have WebKit initialized before calling this method. - const WebHistoryItem& item = - HistoryItemFromString(content_state, NEVER_INCLUDE_FORM_DATA, true); - if (item.isNull()) { - // Couldn't parse the string, return an empty string. - return std::string(); - } - - return HistoryItemToString(item); -} - std::string RemovePasswordDataFromHistoryState( const std::string& content_state) { // TODO(darin): We should avoid using the WebKit API here, so that we do not diff --git a/webkit/glue/glue_serialize.h b/webkit/glue/glue_serialize.h index d01e5a1..348b201 100644 --- a/webkit/glue/glue_serialize.h +++ b/webkit/glue/glue_serialize.h @@ -38,10 +38,6 @@ WEBKIT_GLUE_EXPORT void HistoryItemToVersionedString( std::string* serialized_item); WEBKIT_GLUE_EXPORT int HistoryItemCurrentVersion(); -// Removes any form data state from the history state string |content_state|. -WEBKIT_GLUE_EXPORT std::string RemoveFormDataFromHistoryState( - const std::string& content_state); - // Removes form data containing passwords from the history state string // |content_state|. WEBKIT_GLUE_EXPORT std::string RemovePasswordDataFromHistoryState( diff --git a/webkit/glue/glue_serialize_unittest.cc b/webkit/glue/glue_serialize_unittest.cc index db3941a..0f84436 100644 --- a/webkit/glue/glue_serialize_unittest.cc +++ b/webkit/glue/glue_serialize_unittest.cc @@ -251,31 +251,6 @@ TEST_F(GlueSerializeTest, BadMessagesTest) { } } -TEST_F(GlueSerializeTest, RemoveFormData) { - const WebHistoryItem& item1 = MakeHistoryItem(true, true); - std::string serialized_item = webkit_glue::HistoryItemToString(item1); - serialized_item = - webkit_glue::RemoveFormDataFromHistoryState(serialized_item); - const WebHistoryItem& item2 = - webkit_glue::HistoryItemFromString(serialized_item); - - ASSERT_FALSE(item1.isNull()); - ASSERT_FALSE(item2.isNull()); - - HistoryItemExpectBaseDataEqual(item1, item2, - webkit_glue::HistoryItemCurrentVersion()); - HistoryItemExpectChildrenEqual(item1, item2); - - // Form data was removed, but the identifier was kept. - const WebHTTPBody& body1 = item1.httpBody(); - const WebHTTPBody& body2 = item2.httpBody(); - EXPECT_FALSE(body1.isNull()); - EXPECT_FALSE(body2.isNull()); - EXPECT_GT(body1.elementCount(), 0U); - EXPECT_EQ(0U, body2.elementCount()); - EXPECT_EQ(body1.identifier(), body2.identifier()); -} - TEST_F(GlueSerializeTest, FilePathsFromHistoryState) { WebHistoryItem item = MakeHistoryItem(false, true); |