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

Unified Diff: base/memory/ref_counted_memory.cc

Issue 84703003: Allow data URL > 2MB for loadDataWithBaseURL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tidy up 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
Index: base/memory/ref_counted_memory.cc
diff --git a/base/memory/ref_counted_memory.cc b/base/memory/ref_counted_memory.cc
index b1deee1120167d8517e41b782b7e8690d4e11b80..c19f17f885e3fa87930e75aefe039f654d01174b 100644
--- a/base/memory/ref_counted_memory.cc
+++ b/base/memory/ref_counted_memory.cc
@@ -21,6 +21,15 @@ RefCountedMemory::RefCountedMemory() {}
RefCountedMemory::~RefCountedMemory() {}
+base::StringPiece RefCountedMemory::AsString(const RefCountedMemory* memory) {
+ if (memory) {
+ return base::StringPiece(reinterpret_cast<const char*>(memory->front()),
+ memory->size());
+ } else {
+ return base::StringPiece();
+ }
+}
+
const unsigned char* RefCountedStaticMemory::front() const {
return data_;
}

Powered by Google App Engine
This is Rietveld 408576698