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

Issue 7031078: Retry r88137: (Closed)

Created:
9 years, 6 months ago by Evan Stade
Modified:
9 years, 6 months ago
Reviewers:
tony
CC:
chromium-reviews, estade+watch_chromium.org, arv (Not doing code reviews), Paweł Hajdan Jr.
Visibility:
Public.

Description

Retry r88137: Add code to calculate the dominant color for a favicon. Currently we calculate the dominant/representative color only for those favicons we need it for (i.e. the ones shown on the NTP). We don't do any caching either in memory or in the favicon db but that can be tacked on later if deemed suitable. Code in color_analysis.* authored by dtrainor BUG=none TEST=trybots Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88600

Patch Set 1 #

Patch Set 2 : mac compile #

Patch Set 3 : fix for test failures #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+772 lines, -5 lines) Patch
M chrome/browser/favicon/favicon_handler.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/ntp4/most_visited_page.js View 1 2 6 chunks +26 lines, -1 line 0 comments Download
A chrome/browser/ui/webui/ntp/favicon_webui_handler.h View 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/ntp/favicon_webui_handler.cc View 1 2 1 chunk +74 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/ntp/most_visited_handler.cc View 1 2 2 chunks +2 lines, -2 lines 2 comments Download
M chrome/browser/ui/webui/ntp/new_tab_ui.cc View 3 chunks +4 lines, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A ui/gfx/color_analysis.h View 1 chunk +112 lines, -0 lines 0 comments Download
A ui/gfx/color_analysis.cc View 1 chunk +324 lines, -0 lines 0 comments Download
A ui/gfx/color_analysis_unittest.cc View 1 1 chunk +180 lines, -0 lines 0 comments Download
M ui/ui_gfx.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ui_unittests.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Evan Stade
csilv is out, arv is out, stuartmorgan is out, so review lands (arbitrarily) on Tony. ...
9 years, 6 months ago (2011-06-09 20:27:43 UTC) #1
tony
LGTM
9 years, 6 months ago (2011-06-09 20:34:38 UTC) #2
tony
http://codereview.chromium.org/7031078/diff/2001/chrome/browser/ui/webui/ntp/most_visited_handler.cc File chrome/browser/ui/webui/ntp/most_visited_handler.cc (right): http://codereview.chromium.org/7031078/diff/2001/chrome/browser/ui/webui/ntp/most_visited_handler.cc#newcode292 chrome/browser/ui/webui/ntp/most_visited_handler.cc:292: page_value->SetString("faviconDominantColor", "rgb(0, 147, 60)"); Nit: Might be worth commenting ...
9 years, 6 months ago (2011-06-09 20:37:23 UTC) #3
Evan Stade
http://codereview.chromium.org/7031078/diff/2001/chrome/browser/ui/webui/ntp/most_visited_handler.cc File chrome/browser/ui/webui/ntp/most_visited_handler.cc (right): http://codereview.chromium.org/7031078/diff/2001/chrome/browser/ui/webui/ntp/most_visited_handler.cc#newcode292 chrome/browser/ui/webui/ntp/most_visited_handler.cc:292: page_value->SetString("faviconDominantColor", "rgb(0, 147, 60)"); On 2011/06/09 20:37:23, tony wrote: ...
9 years, 6 months ago (2011-06-09 20:51:06 UTC) #4
tony
9 years, 6 months ago (2011-06-09 21:05:25 UTC) #5
I agree.  I don't feel that strongly about this.

On 2011/06/09 20:51:06, Evan Stade wrote:
>
http://codereview.chromium.org/7031078/diff/2001/chrome/browser/ui/webui/ntp/...
> File chrome/browser/ui/webui/ntp/most_visited_handler.cc (right):
> 
>
http://codereview.chromium.org/7031078/diff/2001/chrome/browser/ui/webui/ntp/...
> chrome/browser/ui/webui/ntp/most_visited_handler.cc:292:
> page_value->SetString("faviconDominantColor", "rgb(0, 147, 60)");
> On 2011/06/09 20:37:23, tony wrote:
> > Nit: Might be worth commenting what these colors are.  Or you could do
> something
> > like const char* kGreen = "rgb(...)";
> 
> I did once ask someone in a code review to do this, but have since decided
it's
> not worth it. The problem is I wouldn't know what to call it (this color is
> different from what you get if you were to type just "green" in css). Seems
the
> best way to get an accurate idea of the color is to use some graphic tool. And
> FWIW, we don't usually do this when colors are defined in css files, which is
> pretty much the same situation.

Powered by Google App Engine
This is Rietveld 408576698