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

Unified Diff: base/memory/ref_counted_memory.h

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.h
diff --git a/base/memory/ref_counted_memory.h b/base/memory/ref_counted_memory.h
index d2987c5d21bd3d1cb1c6ebd6bf3c7f827b341491..53592812501630e7067cac9ebb1684f504d1d04f 100644
--- a/base/memory/ref_counted_memory.h
+++ b/base/memory/ref_counted_memory.h
@@ -11,6 +11,7 @@
#include "base/base_export.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/strings/string_piece.h"
namespace base {
@@ -20,6 +21,10 @@ namespace base {
class BASE_EXPORT RefCountedMemory
: public base::RefCountedThreadSafe<RefCountedMemory> {
public:
+ // Returns a StringPiece representing this memory, or an empty StringPiece
+ // if |memory| is NULL.
+ static base::StringPiece AsString(const RefCountedMemory* memory);
+
// Retrieves a pointer to the beginning of the data we point to. If the data
// is empty, this will return NULL.
virtual const unsigned char* front() const = 0;

Powered by Google App Engine
This is Rietveld 408576698