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

Unified Diff: content/public/common/page_state.cc

Issue 1410543014: Gather more debug info for the switch away from page id for titles and state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix null check Created 5 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 | « content/public/common/page_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « content/public/common/page_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698