| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ppapi/proxy/flash_font_file_resource.h" | 5 #include "ppapi/proxy/flash_font_file_resource.h" |
| 6 | 6 |
| 7 #include <cstring> | 7 #include <cstring> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" |
| 9 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/proxy/ppapi_messages.h" | 11 #include "ppapi/proxy/ppapi_messages.h" |
| 11 | 12 |
| 12 namespace ppapi { | 13 namespace ppapi { |
| 13 namespace proxy { | 14 namespace proxy { |
| 14 | 15 |
| 15 FlashFontFileResource::FlashFontFileResource( | 16 FlashFontFileResource::FlashFontFileResource( |
| 16 Connection connection, | 17 Connection connection, |
| 17 PP_Instance instance, | 18 PP_Instance instance, |
| 18 const PP_BrowserFont_Trusted_Description* description, | 19 const PP_BrowserFont_Trusted_Description* description, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 66 |
| 66 const std::string* FlashFontFileResource::GetFontTable(uint32_t table) const { | 67 const std::string* FlashFontFileResource::GetFontTable(uint32_t table) const { |
| 67 FontTableMap::const_iterator found = font_tables_.find(table); | 68 FontTableMap::const_iterator found = font_tables_.find(table); |
| 68 return (found != font_tables_.end()) ? found->second : nullptr; | 69 return (found != font_tables_.end()) ? found->second : nullptr; |
| 69 } | 70 } |
| 70 | 71 |
| 71 const std::string* FlashFontFileResource::AddFontTable( | 72 const std::string* FlashFontFileResource::AddFontTable( |
| 72 uint32_t table, | 73 uint32_t table, |
| 73 const std::string& contents) { | 74 const std::string& contents) { |
| 74 FontTableMap::const_iterator it = | 75 FontTableMap::const_iterator it = |
| 75 font_tables_.set(table, make_scoped_ptr(new std::string(contents))); | 76 font_tables_.set(table, base::WrapUnique(new std::string(contents))); |
| 76 return it->second; | 77 return it->second; |
| 77 } | 78 } |
| 78 | 79 |
| 79 } // namespace proxy | 80 } // namespace proxy |
| 80 } // namespace ppapi | 81 } // namespace ppapi |
| OLD | NEW |