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

Unified Diff: base/android/content_uri_utils.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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
« no previous file with comments | « base/android/content_uri_utils.h ('k') | base/android/content_uri_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/content_uri_utils.cc
diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils.cc
deleted file mode 100644
index 0482feef891db38f3f6807fb9f9fba9126fcb936..0000000000000000000000000000000000000000
--- a/base/android/content_uri_utils.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 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.
-
-#include "base/android/content_uri_utils.h"
-
-#include "base/android/jni_android.h"
-#include "base/android/jni_string.h"
-#include "jni/ContentUriUtils_jni.h"
-
-using base::android::ConvertUTF8ToJavaString;
-
-namespace base {
-
-bool RegisterContentUriUtils(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-bool ContentUriExists(const FilePath& content_uri) {
- JNIEnv* env = base::android::AttachCurrentThread();
- ScopedJavaLocalRef<jstring> j_uri =
- ConvertUTF8ToJavaString(env, content_uri.value());
- return Java_ContentUriUtils_contentUriExists(
- env, base::android::GetApplicationContext(), j_uri.obj());
-}
-
-File OpenContentUriForRead(const FilePath& content_uri) {
- JNIEnv* env = base::android::AttachCurrentThread();
- ScopedJavaLocalRef<jstring> j_uri =
- ConvertUTF8ToJavaString(env, content_uri.value());
- jint fd = Java_ContentUriUtils_openContentUriForRead(
- env, base::android::GetApplicationContext(), j_uri.obj());
- if (fd < 0)
- return File();
- return File(fd);
-}
-
-std::string GetContentUriMimeType(const FilePath& content_uri) {
- JNIEnv* env = base::android::AttachCurrentThread();
- ScopedJavaLocalRef<jstring> j_uri =
- ConvertUTF8ToJavaString(env, content_uri.value());
- ScopedJavaLocalRef<jstring> j_mime =
- Java_ContentUriUtils_getMimeType(
- env, base::android::GetApplicationContext(), j_uri.obj());
- return base::android::ConvertJavaStringToUTF8(env, j_mime.obj());
-}
-
-} // namespace base
« no previous file with comments | « base/android/content_uri_utils.h ('k') | base/android/content_uri_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698