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

Unified Diff: native_client_sdk/src/tests/nacl_io_test/fake_var_interface.h

Issue 137853023: [NaCl SDK] nacl_io: Add new fakes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
Index: native_client_sdk/src/tests/nacl_io_test/fake_var_interface.h
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_var_interface.h b/native_client_sdk/src/tests/nacl_io_test/fake_var_interface.h
index 0d59ac628a715440bb1865b4dc3f85fa169f8fc9..2073fefc11b958717b7af041d98aef5fa33b8326 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_var_interface.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_var_interface.h
@@ -2,21 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIBRARIES_NACL_IO_TEST_FAKE_VAR_INTERFACE_H_
-#define LIBRARIES_NACL_IO_TEST_FAKE_VAR_INTERFACE_H_
-
-#include <map>
-#include <string>
+#ifndef TESTS_NACL_IO_TEST_FAKE_VAR_INTERFACE_H_
+#define TESTS_NACL_IO_TEST_FAKE_VAR_INTERFACE_H_
#include <ppapi/c/pp_var.h>
#include "nacl_io/pepper_interface.h"
#include "sdk_util/macros.h"
+class FakeVarManager;
+
class FakeVarInterface : public nacl_io::VarInterface {
public:
- FakeVarInterface();
- ~FakeVarInterface();
+ FakeVarInterface(FakeVarManager* manager);
binji 2014/01/17 01:31:14 explicit
Sam Clegg 2014/01/17 22:40:11 Done.
virtual void AddRef(PP_Var var);
virtual void Release(PP_Var var);
@@ -24,18 +22,7 @@ class FakeVarInterface : public nacl_io::VarInterface {
virtual const char* VarToUtf8(PP_Var var, uint32_t* out_len);
private:
- typedef uint64_t Id;
-
- struct FakeStringVar {
- std::string value;
- int32_t ref_count;
- };
-
- typedef std::map<Id, FakeStringVar> VarMap;
- Id next_id_;
- VarMap var_map_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeVarInterface);
+ FakeVarManager* manager_;
binji 2014/01/17 01:31:14 DISALLOW_COPY_AND_ASSIGN?
Sam Clegg 2014/01/17 22:40:11 Done.
};
-#endif // LIBRARIES_NACL_IO_TEST_FAKE_VAR_INTERFACE_H_
+#endif // TESTS_NACL_IO_TEST_FAKE_VAR_INTERFACE_H_

Powered by Google App Engine
This is Rietveld 408576698