mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2025-02-21 09:23:18 +03:00
base: Remove JNI function on Android
This commit is contained in:
parent
1d80429e28
commit
100c34ac00
@ -4,22 +4,10 @@
|
|||||||
|
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
|
|
||||||
#include "base/android/jni_string.h"
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/path_service.h"
|
#include "base/path_service.h"
|
||||||
|
|
||||||
// Must come after all headers that specialize FromJniType() / ToJniType().
|
|
||||||
#include "base/base_jni/FileUtils_jni.h"
|
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
namespace android {
|
|
||||||
|
|
||||||
static std::string JNI_FileUtils_GetAbsoluteFilePath(JNIEnv* env,
|
|
||||||
std::string& file_path) {
|
|
||||||
return MakeAbsoluteFilePath(base::FilePath(file_path)).value();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace android
|
|
||||||
|
|
||||||
bool GetShmemTempDir(bool executable, base::FilePath* path) {
|
bool GetShmemTempDir(bool executable, base::FilePath* path) {
|
||||||
return PathService::Get(base::DIR_CACHE, path);
|
return PathService::Get(base::DIR_CACHE, path);
|
||||||
|
@ -990,7 +990,7 @@ bool GetFileInfo(const FilePath& file_path, File::Info* results) {
|
|||||||
// Fstat on a virtual content-uri will get size=0 and last_modified=now.
|
// Fstat on a virtual content-uri will get size=0 and last_modified=now.
|
||||||
// Fix size, and set last_modified=0 to at least make it stable.
|
// Fix size, and set last_modified=0 to at least make it stable.
|
||||||
if (success && results->size == 0) {
|
if (success && results->size == 0) {
|
||||||
int64_t size = GetContentUriFileSize(file_path);
|
int64_t size = 0;
|
||||||
if (size >= 0) {
|
if (size >= 0) {
|
||||||
results->size = size;
|
results->size = size;
|
||||||
results->last_modified = Time();
|
results->last_modified = Time();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user