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

Issue 3681008: Improvements to the Google News extension (Closed)

Created:
10 years, 2 months ago by anujb
Modified:
9 years, 7 months ago
CC:
vikramb_google.com, anupams_google.com, satyanarayanav1, prateekk_google.com
Visibility:
Public.

Description

Improvements to the Google News extension. * Patch by anujb BUG=None TEST=None TBR=kathyw Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66100

Patch Set 1 #

Total comments: 56

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1486 lines, -318 lines) Patch
A chrome/common/extensions/docs/examples/extensions/news/_locales/en/messages.json View 6 1 chunk +102 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/css/feed.css View 1 1 chunk +101 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/css/options.css View 1 2 3 4 5 6 1 chunk +121 lines, -0 lines 0 comments Download
D chrome/common/extensions/docs/examples/extensions/news/feed.html View 1 chunk +0 lines, -310 lines 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/images/buzz.png View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/images/fb.png View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/images/news.gif View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/images/news_action.png View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/images/sprite_arrows.gif View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/images/twitter.png View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/javascript/feed.js View 1 2 3 4 5 1 chunk +388 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/javascript/options.js View 1 2 3 4 5 6 1 chunk +395 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/javascript/util.js View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/examples/extensions/news/manifest.json View 1 2 3 4 5 1 chunk +11 lines, -8 lines 0 comments Download
D chrome/common/extensions/docs/examples/extensions/news/news_action.png View Binary file 0 comments Download
D chrome/common/extensions/docs/examples/extensions/news/news_icon.png View Binary file 0 comments Download
D chrome/common/extensions/docs/examples/extensions/news/sprite_arrows.gif View Binary file 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/views/background.html View 1 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/views/feed.html View 1 2 3 4 5 1 chunk +146 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/examples/extensions/news/views/options.html View 1 2 3 4 5 6 1 chunk +166 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
kurrik.chromium
Hi, some general feedback: License headers should be added or changed in all files to ...
10 years, 2 months ago (2010-10-21 03:25:10 UTC) #1
navneetg
I have incorporated all the changes. Please review. http://codereview.chromium.org/3681008/diff/1/14 File chrome/common/extensions/docs/examples/extensions/news/javascript/feed.js (right): http://codereview.chromium.org/3681008/diff/1/14#newcode1 chrome/common/extensions/docs/examples/extensions/news/javascript/feed.js:1: // ...
10 years, 2 months ago (2010-10-25 10:55:51 UTC) #2
kurrik.chromium
LGTM. There's a few minor changes you might consider making, but looks pretty good. http://codereview.chromium.org/3681008/diff/1/14 ...
10 years, 1 month ago (2010-10-26 23:29:31 UTC) #3
kurrik.chromium
One more note I just noticed - the minutes will go into negative in some ...
10 years, 1 month ago (2010-10-27 00:34:35 UTC) #4
navneetg
10 years, 1 month ago (2010-10-27 13:47:44 UTC) #5
Hi,

Please find below my updates on your comments from patch set 5.
Apart from these I have modified the 'custom topics' section and replaced the
content area with text area, So as to hold special characters and white-space
issues.

Thanks & Regards,
Navneet

http://codereview.chromium.org/3681008/diff/1/14
File chrome/common/extensions/docs/examples/extensions/news/javascript/feed.js
(right):

http://codereview.chromium.org/3681008/diff/1/14#newcode200
chrome/common/extensions/docs/examples/extensions/news/javascript/feed.js:200:
// The story body is created as an iframe with a data: URL in order to
On 2010/10/26 23:29:32, kurrik.chromium wrote:
> I think the concern would be that the feed could embed a call to chrome.*
calls
> via XSS.  Since you're embedding Google News this is less of a concern, but it
> would still be nice to know.
> 
> On 2010/10/25 10:55:51, navneetg wrote:
> > On 2010/10/21 03:25:10, kurrik.chromium wrote:
> > > Does this really work?  Cool :)  
> > > 
> > > Does this prevent the body from making chrome.* API calls?  That would be
my
> > > biggest concern here.
> > 
> > Reply: Actually i am not using any chrome.* API right now inside iframe.
> 
> 

ok

http://codereview.chromium.org/3681008/diff/1/15
File
chrome/common/extensions/docs/examples/extensions/news/javascript/options.js
(right):

http://codereview.chromium.org/3681008/diff/1/15#newcode31
chrome/common/extensions/docs/examples/extensions/news/javascript/options.js:31:
}
On 2010/10/26 23:29:32, kurrik.chromium wrote:
> Interesting, I didn't realize that lint warned on this.  I still prefer to use
> semicolons after function declarations, but I guess you could remove them if
the
> lint warnings bother you.
> 
> You should still use semicolons after any assignment, including
> myFunction.prototype.myMethod = function() {...};
> 
> On 2010/10/25 10:55:51, navneetg wrote:
> > On 2010/10/21 03:25:10, kurrik.chromium wrote:
> > > Minor style nit - function declarations in JS should end in semicolons -
see
> > >
> >
>
http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone...
> > > for rationale.  Applies everywhere.
> > 
> > Reply: I have incoporated this change everywhere, but it shows error while
> > running 'gjslint' command.
> 
> 

Reply: I have removed semicolon after every function declaration.

http://codereview.chromium.org/3681008/diff/1/15#newcode254
chrome/common/extensions/docs/examples/extensions/news/javascript/options.js:254:
window.localStorage.setItem('keywords', keywords);
On 2010/10/26 23:29:32, kurrik.chromium wrote:
> I wouldn't rely on the automatic serialization to behave a certain way. 
Perhaps
> wrap calls to localStorage with JSON.parse and JSON.stringify methods to be
> explicit about what is happening?
> 
> e.g.:
>   localStorage['foo'] = JSON.stringify(myArray);
>   var myArray = JSON.parse(localStorage['foo'] || "[]");
> 
> 
> 
> On 2010/10/25 10:55:51, navneetg wrote:
> > On 2010/10/21 03:25:10, kurrik.chromium wrote:
> > > You read keywords from localstorage and split on ",", but then here you
> write
> > > the array into localstorage - does this code work the second time around? 
> > > Shouldn't you set keywords to keywords.join(',') ?
> > 
> > Reply: As the array converts into string by default, i thought of using it
as
> > such. Is it best practice?
> 
> 

Done.

Powered by Google App Engine
This is Rietveld 408576698