summaryrefslogtreecommitdiff
path: root/chromium/content/common/font_config_ipc_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/common/font_config_ipc_linux.cc')
-rw-r--r--chromium/content/common/font_config_ipc_linux.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/chromium/content/common/font_config_ipc_linux.cc b/chromium/content/common/font_config_ipc_linux.cc
index d1dd8ca187f..294bcf83fbf 100644
--- a/chromium/content/common/font_config_ipc_linux.cc
+++ b/chromium/content/common/font_config_ipc_linux.cc
@@ -13,9 +13,12 @@
#include <sys/uio.h>
#include <unistd.h>
+#include <functional>
+
#include "base/files/file_util.h"
#include "base/files/memory_mapped_file.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/pickle.h"
#include "base/posix/unix_domain_socket_linux.h"
#include "base/threading/thread_restrictions.h"
@@ -26,13 +29,12 @@
#include "third_party/skia/include/core/SkStream.h"
#include "third_party/skia/include/core/SkTypeface.h"
+namespace content {
-namespace BASE_HASH_NAMESPACE {
-
-std::size_t hash<SkFontConfigInterface::FontIdentity>::operator()(
+std::size_t SkFontConfigInterfaceFontIdentityHash::operator()(
const SkFontConfigInterface::FontIdentity& sp) const {
- hash<std::string> stringhash;
- hash<int> inthash;
+ std::hash<std::string> stringhash;
+ std::hash<int> inthash;
size_t r = inthash(sp.fID);
r = r * 41 + inthash(sp.fTTCIndex);
r = r * 41 + stringhash(sp.fString.c_str());
@@ -42,10 +44,6 @@ std::size_t hash<SkFontConfigInterface::FontIdentity>::operator()(
return r;
}
-} // namespace BASE_HASH_NAMESPACE
-
-namespace content {
-
// Wikpedia's main country selection page activates 21 fallback fonts,
// doubling this we should be on the generous side as an upper bound,
// but nevertheless not have the mapped typefaces cache grow excessively.