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

Side by Side Diff: components/favicon_base/favicon_types.cc

Issue 2866033002: [NTP Tiles] Fetch missing MostLikely tiles from a Google server (Closed)
Patch Set: Some unit-tests Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/favicon_base/favicon_types.h" 5 #include "components/favicon_base/favicon_types.h"
6 6
7 #include "components/favicon_base/fallback_icon_style.h" 7 #include "components/favicon_base/fallback_icon_style.h"
8 8
9 namespace favicon_base { 9 namespace favicon_base {
10 10
(...skipping 20 matching lines...) Expand all
31 // LargeIconResult 31 // LargeIconResult
32 32
33 LargeIconResult::LargeIconResult(const FaviconRawBitmapResult& bitmap_in) 33 LargeIconResult::LargeIconResult(const FaviconRawBitmapResult& bitmap_in)
34 : bitmap(bitmap_in) {} 34 : bitmap(bitmap_in) {}
35 35
36 LargeIconResult::LargeIconResult(FallbackIconStyle* fallback_icon_style_in) 36 LargeIconResult::LargeIconResult(FallbackIconStyle* fallback_icon_style_in)
37 : fallback_icon_style(fallback_icon_style_in) {} 37 : fallback_icon_style(fallback_icon_style_in) {}
38 38
39 LargeIconResult::~LargeIconResult() {} 39 LargeIconResult::~LargeIconResult() {}
40 40
41 bool LargeIconResult::is_empty() const {
42 return !bitmap.is_valid() &&
43 (!fallback_icon_style ||
44 fallback_icon_style->is_default_background_color);
sfiera 2017/05/09 08:53:36 I find this condition hard to read. What about:
pkotwicz 2017/05/09 17:40:34 It would be nice if FallbackIconStyle had a Fallba
jkrcal 2017/05/10 17:26:03 So far, I went for the suggestion of sfiera@. Can
jkrcal 2017/05/10 17:26:03 Done.
45 }
46
41 // -------------------------------------------------------- 47 // --------------------------------------------------------
42 // LargeIconImageResult 48 // LargeIconImageResult
43 49
44 LargeIconImageResult::LargeIconImageResult(const gfx::Image& image_in) 50 LargeIconImageResult::LargeIconImageResult(const gfx::Image& image_in)
45 : image(image_in) {} 51 : image(image_in) {}
46 52
47 LargeIconImageResult::LargeIconImageResult( 53 LargeIconImageResult::LargeIconImageResult(
48 FallbackIconStyle* fallback_icon_style_in) 54 FallbackIconStyle* fallback_icon_style_in)
49 : fallback_icon_style(fallback_icon_style_in) {} 55 : fallback_icon_style(fallback_icon_style_in) {}
50 56
51 LargeIconImageResult::~LargeIconImageResult() {} 57 LargeIconImageResult::~LargeIconImageResult() {}
52 58
53 } // namespace favicon_base 59 } // namespace favicon_base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698