Move |GetCanonicalEncodingNameByAliasName| to base/i18n
This CL moves the encoding-related utility method to base/i18n where
it belongs better and makes itself available directly to
embedder/contents.
It also helps the interface ContentBrowserClient do without
the method of the same name, which makes it simpler.
Review-Url: https://codereview.chromium.org/2578003002
Cr-Commit-Position: refs/heads/master@{#441326}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a1542f0..deee5480 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -12,6 +12,7 @@
#include "base/command_line.h"
#include "base/debug/dump_without_crashing.h"
#include "base/feature_list.h"
+#include "base/i18n/character_encoding.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
@@ -5156,8 +5157,7 @@
return;
last_reported_encoding_ = encoding;
- canonical_encoding_ = GetContentClient()->browser()->
- GetCanonicalEncodingNameByAliasName(encoding);
+ canonical_encoding_ = base::GetCanonicalEncodingNameByAliasName(encoding);
}
bool WebContentsImpl::IsHidden() {