OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef BASE_TEST_TEST_FILE_UTIL_H_ | 5 #ifndef BASE_TEST_TEST_FILE_UTIL_H_ |
6 #define BASE_TEST_TEST_FILE_UTIL_H_ | 6 #define BASE_TEST_TEST_FILE_UTIL_H_ |
7 | 7 |
8 // File utility functions used only by tests. | 8 // File utility functions used only by tests. |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 private: | 75 private: |
76 const FilePath path_; | 76 const FilePath path_; |
77 void* info_; // The opaque stored permission information. | 77 void* info_; // The opaque stored permission information. |
78 size_t length_; // The length of the stored permission information. | 78 size_t length_; // The length of the stored permission information. |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(FilePermissionRestorer); | 80 DISALLOW_COPY_AND_ASSIGN(FilePermissionRestorer); |
81 }; | 81 }; |
82 | 82 |
83 #if defined(OS_ANDROID) | 83 #if defined(OS_ANDROID) |
84 // Register the ContentUriTestUrils JNI bindings. | |
85 bool RegisterContentUriTestUtils(JNIEnv* env); | |
86 | |
87 // Insert an image file into the MediaStore, and retrieve the content URI for | 84 // Insert an image file into the MediaStore, and retrieve the content URI for |
88 // testing purpose. | 85 // testing purpose. |
89 FilePath InsertImageIntoMediaStore(const FilePath& path); | 86 FilePath InsertImageIntoMediaStore(const FilePath& path); |
90 #endif // defined(OS_ANDROID) | 87 #endif // defined(OS_ANDROID) |
91 | 88 |
92 } // namespace base | 89 } // namespace base |
93 | 90 |
94 #endif // BASE_TEST_TEST_FILE_UTIL_H_ | 91 #endif // BASE_TEST_TEST_FILE_UTIL_H_ |
OLD | NEW |