mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 770912 - Take out log lines that print out URLs and other sensitive information. r=mfinkle
This commit is contained in:
parent
2e538f1f8f
commit
40d29da276
@ -544,15 +544,11 @@ abstract public class BrowserApp extends GeckoApp
|
||||
if (favicon == null)
|
||||
return;
|
||||
|
||||
Log.i(LOGTAG, "Favicon successfully loaded for URL = " + pageUrl);
|
||||
|
||||
// The tab might be pointing to another URL by the time the
|
||||
// favicon is finally loaded, in which case we simply ignore it.
|
||||
if (!tab.getURL().equals(pageUrl))
|
||||
return;
|
||||
|
||||
Log.i(LOGTAG, "Favicon is for current URL = " + pageUrl);
|
||||
|
||||
tab.updateFavicon(favicon);
|
||||
tab.setFaviconLoadId(Favicons.NOT_LOADING);
|
||||
|
||||
|
@ -91,8 +91,6 @@ public class Favicons {
|
||||
}
|
||||
|
||||
public String getFaviconUrlForPageUrl(String pageUrl) {
|
||||
Log.d(LOGTAG, "Calling getFaviconUrlForPageUrl() for " + pageUrl);
|
||||
|
||||
SQLiteDatabase db = mDbHelper.getReadableDatabase();
|
||||
|
||||
SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
|
||||
@ -117,8 +115,6 @@ public class Favicons {
|
||||
}
|
||||
|
||||
public void setFaviconUrlForPageUrl(String pageUrl, String faviconUrl) {
|
||||
Log.d(LOGTAG, "Calling setFaviconUrlForPageUrl() for " + pageUrl);
|
||||
|
||||
SQLiteDatabase db = mDbHelper.getWritableDatabase();
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
@ -173,10 +169,6 @@ public class Favicons {
|
||||
|
||||
task.execute();
|
||||
|
||||
Log.d(LOGTAG, "Calling loadFavicon() with URL = " + pageUrl +
|
||||
" and favicon URL = " + faviconUrl +
|
||||
" (" + taskId + ")");
|
||||
|
||||
return taskId;
|
||||
}
|
||||
|
||||
@ -231,21 +223,13 @@ public class Favicons {
|
||||
mPageUrl = pageUrl;
|
||||
mFaviconUrl = faviconUrl;
|
||||
mListener = listener;
|
||||
|
||||
Log.d(LOGTAG, "Creating LoadFaviconTask with URL = " + pageUrl +
|
||||
" and favicon URL = " + faviconUrl);
|
||||
}
|
||||
|
||||
// Runs in background thread
|
||||
private BitmapDrawable loadFaviconFromDb() {
|
||||
Log.d(LOGTAG, "Loading favicon from DB for URL = " + mPageUrl);
|
||||
|
||||
ContentResolver resolver = mContext.getContentResolver();
|
||||
BitmapDrawable favicon = BrowserDB.getFaviconForUrl(resolver, mPageUrl);
|
||||
|
||||
if (favicon != null)
|
||||
Log.d(LOGTAG, "Loaded favicon from DB successfully for URL = " + mPageUrl);
|
||||
|
||||
return favicon;
|
||||
}
|
||||
|
||||
@ -254,20 +238,15 @@ public class Favicons {
|
||||
// since the Async task can run this on any number of threads in the
|
||||
// pool, we need to protect against inserting the same url twice
|
||||
synchronized(mDbHelper) {
|
||||
Log.d(LOGTAG, "Saving favicon on browser database for URL = " + mPageUrl);
|
||||
ContentResolver resolver = mContext.getContentResolver();
|
||||
BrowserDB.updateFaviconForUrl(resolver, mPageUrl, favicon);
|
||||
|
||||
Log.d(LOGTAG, "Saving favicon URL for URL = " + mPageUrl);
|
||||
mDbHelper.setFaviconUrlForPageUrl(mPageUrl, mFaviconUrl);
|
||||
}
|
||||
}
|
||||
|
||||
// Runs in background thread
|
||||
private BitmapDrawable downloadFavicon(URL faviconUrl) {
|
||||
Log.d(LOGTAG, "Downloading favicon for URL = " + mPageUrl +
|
||||
" with favicon URL = " + mFaviconUrl);
|
||||
|
||||
if (mFaviconUrl.startsWith("jar:jar:")) {
|
||||
return GeckoJarReader.getBitmapDrawable(GeckoApp.mAppContext.getResources(), mFaviconUrl);
|
||||
}
|
||||
@ -276,7 +255,7 @@ public class Favicons {
|
||||
try {
|
||||
uri = faviconUrl.toURI();
|
||||
} catch (URISyntaxException e) {
|
||||
Log.d(LOGTAG, "Could not get URI for favicon URL: " + mFaviconUrl);
|
||||
Log.d(LOGTAG, "Could not get URI for favicon");
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -324,12 +303,10 @@ public class Favicons {
|
||||
faviconUrl = new URL(mFaviconUrl);
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
Log.d(LOGTAG, "The provided favicon URL is not valid", e);
|
||||
Log.d(LOGTAG, "The provided favicon URL is not valid");
|
||||
return null;
|
||||
}
|
||||
|
||||
Log.d(LOGTAG, "Favicon URL is now: " + mFaviconUrl);
|
||||
|
||||
if (isCancelled())
|
||||
return null;
|
||||
|
||||
@ -346,7 +323,6 @@ public class Favicons {
|
||||
image = downloadFavicon(faviconUrl);
|
||||
|
||||
if (image != null) {
|
||||
Log.d(LOGTAG, "Downloaded favicon successfully for URL = " + mPageUrl);
|
||||
saveFaviconToDb(image);
|
||||
}
|
||||
|
||||
@ -355,9 +331,6 @@ public class Favicons {
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(final BitmapDrawable image) {
|
||||
Log.d(LOGTAG, "LoadFaviconTask finished for URL = " + mPageUrl +
|
||||
" (" + mId + ")");
|
||||
|
||||
mLoadTasks.remove(mId);
|
||||
|
||||
if (mListener != null) {
|
||||
@ -372,9 +345,6 @@ public class Favicons {
|
||||
|
||||
@Override
|
||||
protected void onCancelled() {
|
||||
Log.d(LOGTAG, "LoadFaviconTask cancelled for URL = " + mPageUrl +
|
||||
" (" + mId + ")");
|
||||
|
||||
mLoadTasks.remove(mId);
|
||||
|
||||
// Note that we don't call the listener callback if the
|
||||
|
@ -841,13 +841,11 @@ abstract public class GeckoApp
|
||||
final int tabId = message.getInt("tabID");
|
||||
final String title = message.getString("title");
|
||||
handleTitleChanged(tabId, title);
|
||||
Log.i(LOGTAG, "title - " + title);
|
||||
} else if (event.equals("DOMLinkAdded")) {
|
||||
final int tabId = message.getInt("tabID");
|
||||
final String rel = message.getString("rel");
|
||||
final String href = message.getString("href");
|
||||
final int size = message.getInt("size");
|
||||
Log.i(LOGTAG, "link rel - " + rel + ", href - " + href + ", size - " + size);
|
||||
handleLinkAdded(tabId, rel, href, size);
|
||||
} else if (event.equals("DOMWindowClose")) {
|
||||
final int tabId = message.getInt("tabID");
|
||||
@ -964,7 +962,6 @@ abstract public class GeckoApp
|
||||
Intent intent = GeckoAppShell.getWebAppIntent(url, origin, false);
|
||||
if (intent == null)
|
||||
return;
|
||||
Log.i(LOGTAG, "Open " + url + " (" + origin + ")");
|
||||
startActivity(intent);
|
||||
} else if (event.equals("WebApps:Install")) {
|
||||
String name = message.getString("name");
|
||||
@ -1711,7 +1708,6 @@ abstract public class GeckoApp
|
||||
try {
|
||||
// this class should only be initialized with an intent with non-null data
|
||||
URL url = new URL(mIntent.getData().toString());
|
||||
Log.i(LOGTAG, "xxx - Loading: " + url);
|
||||
// data url should have an http scheme
|
||||
mConnection = (HttpURLConnection) url.openConnection();
|
||||
mConnection.setRequestProperty("User-Agent", getUAStringForHost(url.getHost()));
|
||||
@ -1832,22 +1828,18 @@ abstract public class GeckoApp
|
||||
else if (ACTION_LOAD.equals(action)) {
|
||||
String uri = intent.getDataString();
|
||||
loadUrl(uri, AwesomeBar.Target.CURRENT_TAB);
|
||||
Log.i(LOGTAG,"onNewIntent: " + uri);
|
||||
}
|
||||
else if (Intent.ACTION_VIEW.equals(action)) {
|
||||
String uri = intent.getDataString();
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createURILoadEvent(uri));
|
||||
Log.i(LOGTAG,"onNewIntent: " + uri);
|
||||
}
|
||||
else if (action != null && action.startsWith(ACTION_WEBAPP_PREFIX)) {
|
||||
String uri = getURIFromIntent(intent);
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createWebappLoadEvent(uri));
|
||||
Log.i(LOGTAG,"Intent : WEBAPP (" + action + ") - " + uri);
|
||||
}
|
||||
else if (ACTION_BOOKMARK.equals(action)) {
|
||||
String uri = getURIFromIntent(intent);
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBookmarkLoadEvent(uri));
|
||||
Log.i(LOGTAG,"Intent : BOOKMARK - " + uri);
|
||||
}
|
||||
else if (ACTION_ALERT_CALLBACK.equals(action)) {
|
||||
String alertName = "";
|
||||
|
@ -369,7 +369,6 @@ public final class GeckoProfile {
|
||||
parser.addSection(generalSection);
|
||||
|
||||
// only set as default if this is the first profile we're creating
|
||||
Log.i(LOGTAG, "WESJ - SET DEFAULT");
|
||||
profileSection.setProperty("Default", 1);
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class GeckoThread extends Thread {
|
||||
}
|
||||
|
||||
// and then fire us up
|
||||
Log.i(LOGTAG, "RunGecko - URI = " + mUri + " args = " + args);
|
||||
Log.i(LOGTAG, "RunGecko - args = " + args);
|
||||
GeckoAppShell.runGecko(app.getApplication().getPackageResourcePath(),
|
||||
args,
|
||||
mUri,
|
||||
|
@ -904,7 +904,7 @@ public class ProfileMigrator {
|
||||
|
||||
mDB.updateFaviconInBatch(mCr, mOperations, url, faviconUrl, faviconGuid, newData);
|
||||
} catch (SQLException e) {
|
||||
Log.i(LOGTAG, "Migrating favicon failed: " + mime + " URL: " + url
|
||||
Log.i(LOGTAG, "Migrating favicon failed: " + mime
|
||||
+ " error:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -409,7 +409,7 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
|
||||
count = c.getCount();
|
||||
c.close();
|
||||
} catch (NullPointerException e) {
|
||||
Log.e(LOGTAG, "NullPointerException in isBookmark for " + uri);
|
||||
Log.e(LOGTAG, "NullPointerException in isBookmark");
|
||||
}
|
||||
|
||||
return (count > 0);
|
||||
|
Loading…
Reference in New Issue
Block a user