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

Unified Diff: third_party/crazy_linker/crazy_linker/src/crazy_linker_system_mock.h

Issue 23717023: Android: Add chrome-specific dynamic linker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove findbugs issues. Created 7 years, 3 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: third_party/crazy_linker/crazy_linker/src/crazy_linker_system_mock.h
diff --git a/third_party/crazy_linker/crazy_linker/src/crazy_linker_system_mock.h b/third_party/crazy_linker/crazy_linker/src/crazy_linker_system_mock.h
new file mode 100644
index 0000000000000000000000000000000000000000..19c9035805f5a18ddc77f4ca797c4d6d56ae9f37
--- /dev/null
+++ b/third_party/crazy_linker/crazy_linker/src/crazy_linker_system_mock.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2013 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 CRAZY_LINKER_SYSTEM_MOCK_H
+#define CRAZY_LINKER_SYSTEM_MOCK_H
+
+#include <stdint.h>
+
+namespace crazy {
+
+class SystemMock {
+public:
+ // Create a new mock system instance and make ScopedFileDescriptor use it.
+ // There can be only one mock system active at a given time.
+ SystemMock();
+
+ // Destroy a mock system instance.
+ ~SystemMock();
+
+ // Add a regular file to the mock file system. |path| is the entry's
+ // path, and |data| and |data_size| are the data there. The data must
+ // stay valid until the mock file system is destroyed.
+ void AddRegularFile(const char* path,
+ const char* data,
+ size_t data_size);
+
+ void AddEnvVariable(const char* var_name, const char* var_value);
+
+ void SetCurrentDir(const char* path);
+};
+
+} // namespace crazy
+
+#endif // CRAZY_LINKER_SYSTEM_MOCK_H

Powered by Google App Engine
This is Rietveld 408576698