diff options
| author | Kristian Monsen <kristianm@google.com> | 2010-02-01 18:41:07 +0000 |
|---|---|---|
| committer | Kristian Monsen <kristianm@google.com> | 2010-02-01 18:41:07 +0000 |
| commit | 0a1d838ccd16ac08300bb8ac89b61ee0c956a49b (patch) | |
| tree | 4bb5159d0026d24484932c2ba9ad8c0af5fcd371 /src/com | |
| parent | 58d56c6b5052faa86083965132cd51b1a9594d0e (diff) | |
| download | packages_apps_Browser-0a1d838ccd16ac08300bb8ac89b61ee0c956a49b.tar.gz packages_apps_Browser-0a1d838ccd16ac08300bb8ac89b61ee0c956a49b.tar.bz2 packages_apps_Browser-0a1d838ccd16ac08300bb8ac89b61ee0c956a49b.zip | |
Log when bookmarks are added
Log when the user add a bookmark, sending the url of the bookmark and how the bookmark was added
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/browser/AddBookmarkPage.java | 1 | ||||
| -rw-r--r-- | src/com/android/browser/EventLogTags.logtags | 7 | ||||
| -rw-r--r-- | src/com/android/browser/HistoryItem.java | 1 | ||||
| -rw-r--r-- | src/com/android/browser/LogTag.java | 14 |
4 files changed, 15 insertions, 8 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java index f5b1ff961..6a6fb3bde 100644 --- a/src/com/android/browser/AddBookmarkPage.java +++ b/src/com/android/browser/AddBookmarkPage.java @@ -243,6 +243,7 @@ public class AddBookmarkPage extends Activity { Thread t = new Thread(new SaveBookmarkRunnable(msg)); t.start(); setResult(RESULT_OK); + LogTag.logBookmarkAdded(url, "bookmarkview"); } return true; } diff --git a/src/com/android/browser/EventLogTags.logtags b/src/com/android/browser/EventLogTags.logtags index c9bb5b064..b3834cf1a 100644 --- a/src/com/android/browser/EventLogTags.logtags +++ b/src/com/android/browser/EventLogTags.logtags @@ -3,12 +3,13 @@ option java_package com.android.browser # This event is logged when a user adds a new bookmark. This could just be a boolean, -# but if lots of users add the same bookmark it could be a default bookmark on the browser -70103 browser_bookmark_added (url|3) +# but if lots of users add the same bookmark it could be a default bookmark on the browser. +# Second parameter is where the bookmark was added from, currently history or bookmarks view. +70103 browser_bookmark_added (url|3), (where|3) # This event is logged after a page has finished loading. It is sending back the page url, # and how long it took to load the page. Could maybe also tell the kind of connection (2g, 3g, WiFi)? 70104 browser_page_loaded (url|3), (time|2|3) -# This event is logged when the user navigates to a new page, sending the time spent on the current page +# This event is logged when the user navigates to a new page, sending the time spent on the current page. 70105 browser_timeonpage (url|3), (time|2|3) diff --git a/src/com/android/browser/HistoryItem.java b/src/com/android/browser/HistoryItem.java index 51cb026f6..72e1b19e5 100644 --- a/src/com/android/browser/HistoryItem.java +++ b/src/com/android/browser/HistoryItem.java @@ -47,6 +47,7 @@ import android.widget.TextView; if (isChecked) { Bookmarks.addBookmark(mContext, mContext.getContentResolver(), mUrl, getName(), null, true); + LogTag.logBookmarkAdded(mUrl, "history"); } else { Bookmarks.removeFromBookmarks(mContext, mContext.getContentResolver(), mUrl, getName()); diff --git a/src/com/android/browser/LogTag.java b/src/com/android/browser/LogTag.java index 9658c6c11..2be313435 100644 --- a/src/com/android/browser/LogTag.java +++ b/src/com/android/browser/LogTag.java @@ -25,20 +25,23 @@ public class LogTag { * Log when the user is adding a new bookmark. * * @param url the url of the new bookmark. + * @param where the location from where the bookmark was added */ - public static void logBookmarkAdded(String url) { - EventLog.writeEvent(EventLogTags.BROWSER_BOOKMARK_ADDED, url); + public static void logBookmarkAdded(String url, String where) { + EventLog.writeEvent(EventLogTags.BROWSER_BOOKMARK_ADDED, url + "|" + + where); } /** * Log when a page has finished loading with how much * time the browser used to load the page. * - * @param url the heartbeat interval used. + * @param url the url of that page that finished loading. * @param duration the time the browser spent loading the page. */ public static void logPageFinishedLoading(String url, long duration) { - EventLog.writeEvent(EventLogTags.BROWSER_BOOKMARK_ADDED, url); + EventLog.writeEvent(EventLogTags.BROWSER_BOOKMARK_ADDED, url + "|" + + duration); } /** @@ -48,6 +51,7 @@ public class LogTag { * @param duration the time spent on the webpage. */ public static void logTimeOnPage(String url, long duration) { - EventLog.writeEvent(EventLogTags.BROWSER_BOOKMARK_ADDED, url); + EventLog.writeEvent(EventLogTags.BROWSER_BOOKMARK_ADDED, url + "|" + + duration); } } |
