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

Side by Side Diff: base/android/java/src/org/chromium/base/ContentUriUtils.java

Issue 1469783002: Cleanup: Correctly spell success(ful). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format media Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 package org.chromium.base; 5 package org.chromium.base;
6 6
7 import android.content.ContentResolver; 7 import android.content.ContentResolver;
8 import android.content.Context; 8 import android.content.Context;
9 import android.database.Cursor; 9 import android.database.Cursor;
10 import android.net.Uri; 10 import android.net.Uri;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 return null; 51 return null;
52 } 52 }
53 53
54 /** 54 /**
55 * Opens the content URI for reading, and returns the file descriptor to 55 * Opens the content URI for reading, and returns the file descriptor to
56 * the caller. The caller is responsible for closing the file desciptor. 56 * the caller. The caller is responsible for closing the file desciptor.
57 * 57 *
58 * @param context {@link Context} in interest 58 * @param context {@link Context} in interest
59 * @param uriString the content URI to open 59 * @param uriString the content URI to open
60 * @return file desciptor upon sucess, or -1 otherwise. 60 * @return file desciptor upon success, or -1 otherwise.
61 */ 61 */
62 @CalledByNative 62 @CalledByNative
63 public static int openContentUriForRead(Context context, String uriString) { 63 public static int openContentUriForRead(Context context, String uriString) {
64 ParcelFileDescriptor pfd = getParcelFileDescriptor(context, uriString); 64 ParcelFileDescriptor pfd = getParcelFileDescriptor(context, uriString);
65 if (pfd != null) { 65 if (pfd != null) {
66 return pfd.detachFd(); 66 return pfd.detachFd();
67 } 67 }
68 return -1; 68 return -1;
69 } 69 }
70 70
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } catch (NullPointerException e) { 145 } catch (NullPointerException e) {
146 // Some android models don't handle the provider call correctly. 146 // Some android models don't handle the provider call correctly.
147 // see crbug.com/345393 147 // see crbug.com/345393
148 return ""; 148 return "";
149 } finally { 149 } finally {
150 if (cursor != null) cursor.close(); 150 if (cursor != null) cursor.close();
151 } 151 }
152 return ""; 152 return "";
153 } 153 }
154 } 154 }
OLDNEW
« no previous file with comments | « ash/content/display/screen_orientation_controller_chromeos_unittest.cc ('k') | base/debug/stack_trace_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698