Index: url/url_canon.h |
diff --git a/url/url_canon.h b/url/url_canon.h |
index c4852e490b05b0286b463ab23eca0c238eeec52a..ff66c6e3086172730eec5112cd4a8899d1a8afcc 100644 |
--- a/url/url_canon.h |
+++ b/url/url_canon.h |
@@ -117,6 +117,11 @@ class CanonOutputT { |
cur_len_ += str_len; |
} |
+ void ReserveSizeIfNeeded(int estimated_size) { |
+ if (estimated_size > buffer_len_) |
+ Resize(estimated_size); |
+ } |
+ |
protected: |
// Grows the given buffer so that it can fit at least |min_additional| |
// characters. Returns true if the buffer could be resized, false on OOM. |