commit | 5c606c1664b0ecfe31dfc6e33993b76a1fca37fa | [log] [tgz] |
---|---|---|
author | Dominic Farolino <[email protected]> | Sat Dec 18 09:40:14 2021 |
committer | Chromium LUCI CQ <[email protected]> | Sat Dec 18 09:40:14 2021 |
tree | ff0a4058e3857d60142fe61956a9b64f28630429 | |
parent | 0cfe166526212df7b52078e522ebc0a12afa1b12 [diff] [blame] |
content: Move encoding from RenderFrameHostImpl => PageImpl [email protected] Bug: 1225366 Change-Id: I737622cc85fe1f28ce277bed74b3c04b7476eb61 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3266393 Reviewed-by: Alexander Timin <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#952702}
diff --git a/content/browser/renderer_host/page_impl.cc b/content/browser/renderer_host/page_impl.cc index ce4287f..2e175c4 100644 --- a/content/browser/renderer_host/page_impl.cc +++ b/content/browser/renderer_host/page_impl.cc
@@ -5,6 +5,7 @@ #include "content/browser/renderer_host/page_impl.h" #include "base/barrier_closure.h" +#include "base/i18n/character_encoding.h" #include "base/trace_event/optional_trace_event.h" #include "content/browser/manifest/manifest_manager_host.h" #include "content/browser/renderer_host/frame_tree_node.h" @@ -248,4 +249,13 @@ constraints, current, animate); } +void PageImpl::UpdateEncoding(const std::string& encoding_name) { + if (encoding_name == last_reported_encoding_) + return; + last_reported_encoding_ = encoding_name; + + canonical_encoding_ = + base::GetCanonicalEncodingNameByAliasName(encoding_name); +} + } // namespace content