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

Unified Diff: content/browser/webui/i18n_source_stream.h

Issue 2601313002: [MD settings] stream i18n replacement without large accumulation buffer (Closed)
Patch Set: nits Created 3 years, 12 months 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 | « no previous file | content/browser/webui/i18n_source_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/i18n_source_stream.h
diff --git a/content/browser/webui/i18n_source_stream.h b/content/browser/webui/i18n_source_stream.h
index 0f37d874869a2f6e9737af88fa193d8266a89b0e..64378c85f3099a85f17fdbef06bdaa4e76e2d510 100644
--- a/content/browser/webui/i18n_source_stream.h
+++ b/content/browser/webui/i18n_source_stream.h
@@ -40,15 +40,16 @@ class CONTENT_EXPORT I18nSourceStream : public net::FilterSourceStream {
int* consumed_bytes,
bool upstream_end_reached) override;
- // Accumulated from upstream.
+ // Keep split $i18n tags (wait for the whole tag). This is expected to vary
+ // in size from 0 to a few KB and should never be larger than the input file
+ // (in the worst case).
std::string input_;
- // To send downstream.
+ // Keep excess that didn't fit in the output buffer. This is expected to vary
+ // in size from 0 to a few KB and should never get much larger than the input
+ // file (in the worst case).
std::string output_;
- // How much of the |output_| has been sent.
- size_t drain_offset_;
-
// A map of i18n replacement keys and translations.
const ui::TemplateReplacements* replacements_; // weak
« no previous file with comments | « no previous file | content/browser/webui/i18n_source_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698