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

Unified Diff: mojo/system/mapping_table.cc

Issue 471773002: Mojo: Add a platform interface for shared memory (embedder::PlatformSharedBuffer). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 6 years, 4 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 | « mojo/system/mapping_table.h ('k') | mojo/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/mapping_table.cc
diff --git a/mojo/system/mapping_table.cc b/mojo/system/mapping_table.cc
index 497b9e0d6a2f39dbf180bd94b21c423b46de7968..7aeb04d17c4b177da18048844a1d9b09f6aa3685 100644
--- a/mojo/system/mapping_table.cc
+++ b/mojo/system/mapping_table.cc
@@ -5,8 +5,8 @@
#include "mojo/system/mapping_table.h"
#include "base/logging.h"
+#include "mojo/embedder/platform_shared_buffer.h"
#include "mojo/system/constants.h"
-#include "mojo/system/raw_shared_buffer.h"
namespace mojo {
namespace system {
@@ -20,13 +20,13 @@ MappingTable::~MappingTable() {
}
MojoResult MappingTable::AddMapping(
- scoped_ptr<RawSharedBufferMapping> mapping) {
+ scoped_ptr<embedder::PlatformSharedBufferMapping> mapping) {
DCHECK(mapping);
if (address_to_mapping_map_.size() >= kMaxMappingTableSize)
return MOJO_RESULT_RESOURCE_EXHAUSTED;
- uintptr_t address = reinterpret_cast<uintptr_t>(mapping->base());
+ uintptr_t address = reinterpret_cast<uintptr_t>(mapping->GetBase());
DCHECK(address_to_mapping_map_.find(address) ==
address_to_mapping_map_.end());
address_to_mapping_map_[address] = mapping.release();
@@ -37,7 +37,7 @@ MojoResult MappingTable::RemoveMapping(uintptr_t address) {
AddressToMappingMap::iterator it = address_to_mapping_map_.find(address);
if (it == address_to_mapping_map_.end())
return MOJO_RESULT_INVALID_ARGUMENT;
- RawSharedBufferMapping* mapping_to_delete = it->second;
+ embedder::PlatformSharedBufferMapping* mapping_to_delete = it->second;
address_to_mapping_map_.erase(it);
delete mapping_to_delete;
return MOJO_RESULT_OK;
« no previous file with comments | « mojo/system/mapping_table.h ('k') | mojo/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698