Chromium Code Reviews| Index: content/renderer/peripheral_content_heuristic.cc |
| diff --git a/content/renderer/peripheral_content_heuristic.cc b/content/renderer/peripheral_content_heuristic.cc |
| index b2c59c994a8af6e54f2c883155648d61d3c8dd20..d2c7a00a0478fcff344e575f207ef23c86b2cc96 100644 |
| --- a/content/renderer/peripheral_content_heuristic.cc |
| +++ b/content/renderer/peripheral_content_heuristic.cc |
| @@ -40,12 +40,12 @@ PeripheralContentHeuristic::GetPeripheralStatus( |
| if (main_frame_origin.IsSameOriginWith(content_origin)) |
| return HEURISTIC_DECISION_ESSENTIAL_SAME_ORIGIN; |
| - if (width <= 0 || height <= 0) |
| - return HEURISTIC_DECISION_ESSENTIAL_UNKNOWN_SIZE; |
| - |
| if (origin_whitelist.count(content_origin)) |
|
groby-ooo-7-16
2015/12/04 22:06:56
Since order matters, probably worth having either
tommycli
2015/12/07 22:06:18
Sounds good. I added a test.
|
| return HEURISTIC_DECISION_ESSENTIAL_CROSS_ORIGIN_WHITELISTED; |
| + if (width <= 0 || height <= 0) |
| + return HEURISTIC_DECISION_ESSENTIAL_UNKNOWN_SIZE; |
| + |
| if (width <= kTinyContentSize && height <= kTinyContentSize) |
| return HEURISTIC_DECISION_ESSENTIAL_CROSS_ORIGIN_TINY; |