Bug 1131257 - Part 0: Cleanup in LocalReadingListDB.

This commit is contained in:
Richard Newman 2015-02-09 14:37:14 -08:00
Родитель e7e0e7b5cb
Коммит 884c832d5a
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -63,16 +63,10 @@ import static org.mozilla.gecko.util.IOUtils.ConsumedInputStream;
import static org.mozilla.gecko.favicons.LoadFaviconTask.DEFAULT_FAVICON_BUFFER_SIZE;
public class LocalBrowserDB implements BrowserDB {
// Calculate these once, at initialization. isLoggable is too expensive to
// have in-line in each log call.
private static final String LOGTAG = "GeckoLocalBrowserDB";
// Sentinel value used to indicate a failure to locate an ID for a default favicon.
private static final int FAVICON_ID_NOT_FOUND = Integer.MIN_VALUE;
// Constant used to indicate that no folder was found for particular GUID.
private static final long FOLDER_NOT_FOUND = -1L;
// Calculate this once, at initialization. isLoggable is too expensive to
// have in-line in each log call.
private static final boolean logDebug = Log.isLoggable(LOGTAG, Log.DEBUG);
protected static void debug(String message) {
if (logDebug) {
@ -80,6 +74,12 @@ public class LocalBrowserDB implements BrowserDB {
}
}
// Sentinel value used to indicate a failure to locate an ID for a default favicon.
private static final int FAVICON_ID_NOT_FOUND = Integer.MIN_VALUE;
// Constant used to indicate that no folder was found for particular GUID.
private static final long FOLDER_NOT_FOUND = -1L;
private final String mProfile;
// Map of folder GUIDs to IDs. Used for caching.