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

Side by Side Diff: ppapi/shared_impl/vpn_provider_util.cc

Issue 1735473002: ppapi: PPB_VpnProvider: Implement Resource Host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vpn-nacl-sdk
Patch Set: Add packet size range checking. Created 4 years, 6 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/shared_impl/vpn_provider_util.h" 5 #include "ppapi/shared_impl/vpn_provider_util.h"
6 6
7 namespace ppapi { 7 namespace ppapi {
8 8
9 VpnProviderSharedBuffer::VpnProviderSharedBuffer( 9 VpnProviderSharedBuffer::VpnProviderSharedBuffer(
10 uint32_t capacity, 10 uint32_t capacity,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 NOTREACHED(); 44 NOTREACHED();
45 return nullptr; 45 return nullptr;
46 } 46 }
47 return reinterpret_cast<char*>(shm_->memory()) + packet_size_ * id; 47 return reinterpret_cast<char*>(shm_->memory()) + packet_size_ * id;
48 } 48 }
49 49
50 base::SharedMemoryHandle VpnProviderSharedBuffer::GetHandle() { 50 base::SharedMemoryHandle VpnProviderSharedBuffer::GetHandle() {
51 return shm_->handle(); 51 return shm_->handle();
52 } 52 }
53 53
54 uint32_t VpnProviderSharedBuffer::GetMaxPacketSize() {
55 return packet_size_;
56 }
57
54 } // namespace ppapi 58 } // namespace ppapi
OLDNEW
« ppapi/shared_impl/vpn_provider_util.h ('K') | « ppapi/shared_impl/vpn_provider_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698