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

Side by Side Diff: chrome/browser/manifest/manifest_icon_downloader.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_downloader.h" 5 #include "chrome/browser/manifest/manifest_icon_downloader.h"
6 6
7 #include <stddef.h>
8
7 #include <limits> 9 #include <limits>
8 10
9 #include "chrome/browser/manifest/manifest_icon_selector.h" 11 #include "chrome/browser/manifest/manifest_icon_selector.h"
10 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
11 #include "content/public/browser/render_frame_host.h" 13 #include "content/public/browser/render_frame_host.h"
12 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
13 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
14 #include "content/public/common/console_message_level.h" 16 #include "content/public/common/console_message_level.h"
15 #include "skia/ext/image_operations.h" 17 #include "skia/ext/image_operations.h"
16 #include "ui/gfx/screen.h" 18 #include "ui/gfx/screen.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 float ratio = height / width; 196 float ratio = height / width;
195 float ratio_difference = fabs(ratio - 1); 197 float ratio_difference = fabs(ratio - 1);
196 if (ratio_difference < best_ratio_difference) { 198 if (ratio_difference < best_ratio_difference) {
197 best_index = i; 199 best_index = i;
198 best_ratio_difference = ratio_difference; 200 best_ratio_difference = ratio_difference;
199 } 201 }
200 } 202 }
201 203
202 return best_index; 204 return best_index;
203 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/manifest/manifest_icon_downloader.h ('k') | chrome/browser/manifest/manifest_icon_downloader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698