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

Unified Diff: sandbox/src/crosscall_client.h

Issue 873006: Re-land second sandbox round of changes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « sandbox/sandbox.gyp ('k') | sandbox/src/crosscall_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/crosscall_client.h
===================================================================
--- sandbox/src/crosscall_client.h (revision 41493)
+++ sandbox/src/crosscall_client.h (working copy)
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SANDBOX_SRC_CROSSCALL_CLIENT_H__
-#define SANDBOX_SRC_CROSSCALL_CLIENT_H__
+#ifndef SANDBOX_SRC_CROSSCALL_CLIENT_H_
+#define SANDBOX_SRC_CROSSCALL_CLIENT_H_
#include "sandbox/src/crosscall_params.h"
#include "sandbox/src/sandbox.h"
@@ -86,6 +86,44 @@
const T& t_;
};
+// This copy helper template specialization if for the void pointer
+// case both 32 and 64 bit.
+template<>
+class CopyHelper<void*> {
+ public:
+ CopyHelper(void* t) : t_(t) {}
+
+ // Returns the pointer to the start of the input.
+ const void* GetStart() const {
+ return &t_;
+ }
+
+ // Update the stored value with the value in the buffer. This is not
+ // supported for this type.
+ bool Update(void* buffer) {
+ // Not supported;
+ return true;
+ }
+
+ // Returns the size of the input in bytes.
+ size_t GetSize() const {
+ return sizeof(t_);
+ }
+
+ // Returns true if the current type is used as an In or InOut parameter.
+ bool IsInOut() {
+ return false;
+ }
+
+ // Returns this object's type.
+ ArgType GetType() {
+ return VOIDPTR_TYPE;
+ }
+
+ private:
+ const void* t_;
+};
+
// This copy helper template specialization catches the cases where the
// parameter is a pointer to a string.
template<>
« no previous file with comments | « sandbox/sandbox.gyp ('k') | sandbox/src/crosscall_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698