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

Unified Diff: ui/base/clipboard/clipboard_win.cc

Issue 141113003: Refactor base/safe_numerics.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 | « tools/imagediff/image_diff.cc ('k') | ui/snapshot/snapshot_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard_win.cc
===================================================================
--- ui/base/clipboard/clipboard_win.cc (revision 245415)
+++ ui/base/clipboard/clipboard_win.cc (working copy)
@@ -7,8 +7,8 @@
#include "ui/base/clipboard/clipboard.h"
+#include <shellapi.h>
#include <shlobj.h>
-#include <shellapi.h>
#include "base/basictypes.h"
#include "base/bind.h"
@@ -16,7 +16,7 @@
#include "base/logging.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
-#include "base/safe_numerics.h"
+#include "base/numerics/safe_conversions.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -518,8 +518,8 @@
offsets.push_back(end_index - html_start);
markup->assign(base::UTF8ToUTF16AndAdjustOffsets(cf_html.data() + html_start,
&offsets));
- *fragment_start = base::checked_numeric_cast<uint32>(offsets[0]);
- *fragment_end = base::checked_numeric_cast<uint32>(offsets[1]);
+ *fragment_start = base::checked_cast<uint32>(offsets[0]);
+ *fragment_end = base::checked_cast<uint32>(offsets[1]);
}
void Clipboard::ReadRTF(ClipboardType type, std::string* result) const {
« no previous file with comments | « tools/imagediff/image_diff.cc ('k') | ui/snapshot/snapshot_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698