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

Side by Side Diff: ppapi/proxy/flash_font_file_resource.cc

Issue 1864293002: Convert //ppapi to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more nullptr Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « ppapi/proxy/flash_font_file_resource.h ('k') | ppapi/proxy/gamepad_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/flash_font_file_resource.h ('k') | ppapi/proxy/gamepad_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698