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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProvider.java

Issue 651853002: Adding new string constants to remove usage of hardcoded string values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProvider.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProvider.java
index add6afe01e94819cfc221bfda0b605bd34c0541a..c60316cc3d7ed81e29e387cd5602adbd5b27f235 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProvider.java
@@ -84,6 +84,14 @@ public class ChromeBrowserProvider extends ContentProvider {
"vnd.android.cursor.dir/browser-history";
private static final String BROWSER_CONTRACT_HISTORY_CONTENT_ITEM_TYPE =
"vnd.android.cursor.item/browser-history";
+ private static final String BROWSER_CONTRACT_BOOKMARK_CONTENT_TYPE =
+ "vnd.android.cursor.dir/bookmark";
+ private static final String BROWSER_CONTRACT_BOOKMARK_CONTENT_ITEM_TYPE =
+ "vnd.android.cursor.item/bookmark";
+ private static final String BROWSER_CONTRACT_SEARCH_CONTENT_TYPE =
+ "vnd.android.cursor.dir/searches";
+ private static final String BROWSER_CONTRACT_SEARCH_CONTENT_ITEM_TYPE =
+ "vnd.android.cursor.item/searches";
// This Authority is for internal interface. It's concatenated with
// Context.getPackageName() so that we can install different channels
@@ -528,14 +536,14 @@ public class ChromeBrowserProvider extends ContentProvider {
switch (match) {
case URI_MATCH_BOOKMARKS:
case URL_MATCH_API_BOOKMARK:
- return "vnd.android.cursor.dir/bookmark";
+ return BROWSER_CONTRACT_BOOKMARK_CONTENT_TYPE;
case URI_MATCH_BOOKMARKS_ID:
case URL_MATCH_API_BOOKMARK_ID:
- return "vnd.android.cursor.item/bookmark";
+ return BROWSER_CONTRACT_BOOKMARK_CONTENT_ITEM_TYPE;
case URL_MATCH_API_SEARCHES:
- return "vnd.android.cursor.dir/searches";
+ return BROWSER_CONTRACT_SEARCH_CONTENT_TYPE;
case URL_MATCH_API_SEARCHES_ID:
- return "vnd.android.cursor.item/searches";
+ return BROWSER_CONTRACT_SEARCH_CONTENT_ITEM_TYPE;
case URL_MATCH_API_HISTORY_CONTENT:
return BROWSER_CONTRACT_HISTORY_CONTENT_TYPE;
case URL_MATCH_API_HISTORY_CONTENT_ID:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698