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

Unified Diff: ui/views/examples/vector_example.cc

Issue 2255403002: Use int rather than size_t to pass DIP amounts to vector icon functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/paint_vector_icon.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/vector_example.cc
diff --git a/ui/views/examples/vector_example.cc b/ui/views/examples/vector_example.cc
index f0ee3db7344c1428f73e138536b1638ed41caf81..f34b155f17817c7b7db062eb504e468e9e788a6f 100644
--- a/ui/views/examples/vector_example.cc
+++ b/ui/views/examples/vector_example.cc
@@ -4,8 +4,6 @@
#include "ui/views/examples/vector_example.h"
-#include <stddef.h>
-
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/macros.h"
@@ -99,7 +97,7 @@ class VectorIconGallery : public View,
void ContentsChanged(Textfield* sender,
const base::string16& new_contents) override {
if (sender == size_input_) {
- if (base::StringToSizeT(new_contents, &size_))
+ if (base::StringToInt(new_contents, &size_))
sky 2016/08/23 23:53:37 If negative is considered an error condition shoul
Peter Kasting 2016/08/24 02:42:00 It looks like gfx::Size() will silently clamp nega
UpdateImage();
else
size_input_->SetText(base::string16());
@@ -153,7 +151,7 @@ class VectorIconGallery : public View,
Button* file_go_button_;
int vector_id_;
- size_t size_;
+ int size_;
SkColor color_;
DISALLOW_COPY_AND_ASSIGN(VectorIconGallery);
« no previous file with comments | « ui/gfx/paint_vector_icon.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698