Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 11627039: Added ad counting functionality (Closed)

Created:
Sept. 11, 2013, 3:10 p.m. by Thomas Greiner
Modified:
Sept. 27, 2013, 8:39 a.m.
Visibility:
Public.

Description

I created a stats module which can be used for more than just counting how many requests were blocked because we intend to add more data in the future. Due to sendRequest and onRequest being deprecated a future commit should update existing parts in the code which use those to use ChromeCompat which is introduced in this commmit.

Patch Set 1 #

Total comments: 28

Patch Set 2 : Changed strings & using appLocale #

Total comments: 14

Patch Set 3 : #

Patch Set 4 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -2 lines) Patch
M _locales/en_US/messages.json View 1 2 1 chunk +57 lines, -0 lines 0 comments Download
M lib/prefs.js View 1 chunk +2 lines, -1 line 0 comments Download
A lib/stats.js View 1 2 3 1 chunk +67 lines, -0 lines 0 comments Download
M metadata.chrome View 1 chunk +1 line, -0 lines 0 comments Download
M popup.html View 1 2 3 2 chunks +51 lines, -0 lines 0 comments Download
A stats.js View 1 2 3 1 chunk +135 lines, -0 lines 4 comments Download
M webrequest.js View 1 2 3 3 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 14
Thomas Greiner
I created a stats module which can be used for more than just counting how ...
Sept. 11, 2013, 3:36 p.m. (2013-09-11 15:36:41 UTC) #1
Felix Dahlke
Only reviewed the strings since we want to have a string freeze today. http://codereview.adblockplus.org/11627039/diff/1/_locales/en_US/messages.json File ...
Sept. 17, 2013, 9:41 a.m. (2013-09-17 09:41:04 UTC) #2
Thomas Greiner
http://codereview.adblockplus.org/11627039/diff/1/_locales/en_US/messages.json File _locales/en_US/messages.json (right): http://codereview.adblockplus.org/11627039/diff/1/_locales/en_US/messages.json#newcode116 _locales/en_US/messages.json:116: "message": "over $number$!", On 2013/09/17 09:41:04, Felix H. Dahlke ...
Sept. 17, 2013, 11:26 a.m. (2013-09-17 11:26:15 UTC) #3
Wladimir Palant
Publishing my comments on the strings first since that's the urgent part. http://codereview.adblockplus.org/11627039/diff/1/_locales/en_US/messages.json File _locales/en_US/messages.json ...
Sept. 18, 2013, 8:37 a.m. (2013-09-18 08:37:32 UTC) #4
Wladimir Palant
My comments on the background page code below. UI code still needs to be reviewed. ...
Sept. 18, 2013, 9:44 a.m. (2013-09-18 09:44:41 UTC) #5
Thomas Greiner
http://codereview.adblockplus.org/11627039/diff/1/_locales/en_US/messages.json File _locales/en_US/messages.json (right): http://codereview.adblockplus.org/11627039/diff/1/_locales/en_US/messages.json#newcode113 _locales/en_US/messages.json:113: }, This is only used in the following context ...
Sept. 18, 2013, 9:48 a.m. (2013-09-18 09:48:25 UTC) #6
Wladimir Palant
http://codereview.adblockplus.org/11627039/diff/1/_locales/en_US/messages.json File _locales/en_US/messages.json (right): http://codereview.adblockplus.org/11627039/diff/1/_locales/en_US/messages.json#newcode124 _locales/en_US/messages.json:124: "description": "Label for link to adblockplus.org", On 2013/09/18 09:48:25, ...
Sept. 18, 2013, 9:56 a.m. (2013-09-18 09:56:47 UTC) #7
Wladimir Palant
LGTM on the strings. Below is the rest of my comments, reviewed UI code as ...
Sept. 18, 2013, 1:22 p.m. (2013-09-18 13:22:17 UTC) #8
Thomas Greiner
Just for clarification purposes: We will extend the stats module in the near future to ...
Sept. 19, 2013, 9:42 a.m. (2013-09-19 09:42:29 UTC) #9
Wladimir Palant
http://codereview.adblockplus.org/11627039/diff/1/lib/prefs.js File lib/prefs.js (right): http://codereview.adblockplus.org/11627039/diff/1/lib/prefs.js#newcode37 lib/prefs.js:37: stats_total: {} On 2013/09/19 09:42:29, Thomas Greiner wrote: > ...
Sept. 19, 2013, 10:56 a.m. (2013-09-19 10:56:22 UTC) #10
Thomas Greiner
I stuck with using an object as preference value for now due to the given ...
Sept. 20, 2013, 3:09 p.m. (2013-09-20 15:09:50 UTC) #11
Wladimir Palant
LGTM with the two nits fixed http://codereview.adblockplus.org/11627039/diff/23011/stats.js File stats.js (right): http://codereview.adblockplus.org/11627039/diff/23011/stats.js#newcode31 stats.js:31: app_id: 475542399197328, Just ...
Sept. 24, 2013, 12:43 p.m. (2013-09-24 12:43:36 UTC) #12
Thomas Greiner
http://codereview.adblockplus.org/11627039/diff/23011/stats.js File stats.js (right): http://codereview.adblockplus.org/11627039/diff/23011/stats.js#newcode88 stats.js:88: } Closing the popup right after a user clicked ...
Sept. 24, 2013, 2:40 p.m. (2013-09-24 14:40:58 UTC) #13
Wladimir Palant
Sept. 25, 2013, 8:44 a.m. (2013-09-25 08:44:51 UTC) #14
http://codereview.adblockplus.org/11627039/diff/23011/stats.js
File stats.js (right):

http://codereview.adblockplus.org/11627039/diff/23011/stats.js#newcode88
stats.js:88: }
On 2013/09/24 14:40:58, Thomas Greiner wrote:
> Closing the popup right after a user clicked on the icon to open it is not a
> good idea. The user should still be able to use the other features that are
> available in the popup.
> Therefore I'd rather leave it like that and not show the stats container in
that
> case.

You are right of course. I forgot that the stats are hidden by default.

Powered by Google App Engine
This is Rietveld