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

Unified Diff: ppapi/proxy/flash_font_file_resource.h

Issue 1147883002: Cleanup some PPAPI proxy code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SIZE_MAX Created 5 years, 7 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 | ppapi/proxy/flash_font_file_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/flash_font_file_resource.h
diff --git a/ppapi/proxy/flash_font_file_resource.h b/ppapi/proxy/flash_font_file_resource.h
index e1b32d58f66ccc44a20e9a0939a74b49a995541f..fada61d4ffe72e16124623ef7db5f4ec6fc1fb88 100644
--- a/ppapi/proxy/flash_font_file_resource.h
+++ b/ppapi/proxy/flash_font_file_resource.h
@@ -5,12 +5,9 @@
#ifndef PPAPI_PROXY_FLASH_FONT_FILE_RESOURCE_H_
#define PPAPI_PROXY_FLASH_FONT_FILE_RESOURCE_H_
-#include <map>
#include <string>
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/linked_ptr.h"
+#include "base/containers/scoped_ptr_hash_map.h"
#include "ppapi/c/private/pp_private_font_charset.h"
#include "ppapi/proxy/plugin_resource.h"
#include "ppapi/proxy/serialized_structs.h"
@@ -42,15 +39,16 @@ class FlashFontFileResource : public PluginResource,
private:
// Sees if we have a cache of the font table and returns a pointer to it.
// Returns NULL if we don't have it.
- std::string* GetFontTable(uint32_t table) const;
+ const std::string* GetFontTable(uint32_t table) const;
- std::string* AddFontTable(uint32_t table, const std::string& contents);
+ const std::string* AddFontTable(uint32_t table, const std::string& contents);
- typedef std::map<uint32_t, linked_ptr<std::string> > FontTableMap;
+ using FontTableMap =
+ base::ScopedPtrHashMap<uint32_t, scoped_ptr<std::string>>;
FontTableMap font_tables_;
SerializedFontDescription description_;
- PP_PrivateFontCharset charset_;
+ const PP_PrivateFontCharset charset_;
DISALLOW_COPY_AND_ASSIGN(FlashFontFileResource);
};
« no previous file with comments | « no previous file | ppapi/proxy/flash_font_file_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698