Index: content/public/common/page_state.cc |
diff --git a/content/public/common/page_state.cc b/content/public/common/page_state.cc |
index 9d100d31b626754d205874ebc42bcbd8754b8c38..6174a8452ce2bd4b434807eb74fc29caf9c7f271 100644 |
--- a/content/public/common/page_state.cc |
+++ b/content/public/common/page_state.cc |
@@ -5,6 +5,7 @@ |
#include "content/public/common/page_state.h" |
#include "base/files/file_path.h" |
+#include "base/logging.h" |
#include "base/strings/utf_string_conversions.h" |
#include "content/common/page_state_serialization.h" |
@@ -119,6 +120,15 @@ const std::string& PageState::ToEncodedData() const { |
return data_; |
} |
+std::string PageState::GetTopLevelUrlStringTemporaryForBug369661() const { |
+ ExplodedPageState state; |
+ CHECK(DecodePageState(data_, &state)); |
+ |
+ base::NullableString16& url_string = state.top.url_string; |
+ CHECK(!url_string.is_null()); |
+ return base::UTF16ToUTF8(url_string.string()); |
+} |
+ |
std::vector<base::FilePath> PageState::GetReferencedFiles() const { |
std::vector<base::FilePath> results; |