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

Side by Side Diff: chrome/browser/manifest/manifest_icon_selector.cc

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/manifest/manifest_icon_selector.h" 5 #include "chrome/browser/manifest/manifest_icon_selector.h"
6 6
7 #include <stddef.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 #include <cmath> 10 #include <cmath>
9 #include <limits> 11 #include <limits>
10 12
11 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
12 #include "components/mime_util/mime_util.h" 14 #include "components/mime_util/mime_util.h"
13 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
14 #include "ui/gfx/screen.h" 16 #include "ui/gfx/screen.h"
15 17
16 using content::Manifest; 18 using content::Manifest;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 std::vector<Manifest::Icon> icons = 180 std::vector<Manifest::Icon> icons =
179 ManifestIconSelector::FilterIconsByType(unfiltered_icons); 181 ManifestIconSelector::FilterIconsByType(unfiltered_icons);
180 182
181 ManifestIconSelector selector(ideal_icon_size_in_px, 183 ManifestIconSelector selector(ideal_icon_size_in_px,
182 minimum_icon_size_in_px); 184 minimum_icon_size_in_px);
183 int index = selector.FindBestMatchingIcon(icons, device_scale_factor); 185 int index = selector.FindBestMatchingIcon(icons, device_scale_factor);
184 if (index == -1) 186 if (index == -1)
185 return GURL(); 187 return GURL();
186 return icons[index].src; 188 return icons[index].src;
187 } 189 }
OLDNEW
« no previous file with comments | « chrome/browser/manifest/manifest_icon_selector.h ('k') | chrome/browser/manifest/manifest_icon_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698