| 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 "base/memory/ptr_util.h" |
| 10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 const std::string* FlashFontFileResource::GetFontTable(uint32_t table) const { | 67 const std::string* FlashFontFileResource::GetFontTable(uint32_t table) const { |
| 68 FontTableMap::const_iterator found = font_tables_.find(table); | 68 FontTableMap::const_iterator found = font_tables_.find(table); |
| 69 return (found != font_tables_.end()) ? found->second : nullptr; | 69 return (found != font_tables_.end()) ? found->second : nullptr; |
| 70 } | 70 } |
| 71 | 71 |
| 72 const std::string* FlashFontFileResource::AddFontTable( | 72 const std::string* FlashFontFileResource::AddFontTable( |
| 73 uint32_t table, | 73 uint32_t table, |
| 74 const std::string& contents) { | 74 const std::string& contents) { |
| 75 FontTableMap::const_iterator it = | 75 FontTableMap::const_iterator it = |
| 76 font_tables_.set(table, base::WrapUnique(new std::string(contents))); | 76 font_tables_.set(table, base::MakeUnique<std::string>(contents)); |
| 77 return it->second; | 77 return it->second; |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace proxy | 80 } // namespace proxy |
| 81 } // namespace ppapi | 81 } // namespace ppapi |
| OLD | NEW |