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

Unified Diff: chrome/browser/net/crl_set_fetcher.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
Index: chrome/browser/net/crl_set_fetcher.cc
===================================================================
--- chrome/browser/net/crl_set_fetcher.cc (revision 245415)
+++ chrome/browser/net/crl_set_fetcher.cc (working copy)
@@ -6,9 +6,9 @@
#include "base/bind.h"
#include "base/file_util.h"
+#include "base/numerics/safe_conversions.h"
#include "base/path_service.h"
#include "base/rand_util.h"
-#include "base/safe_numerics.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/component_updater/component_updater_service.h"
@@ -168,7 +168,7 @@
LOG(WARNING) << "Failed to parse CRL set from update CRX";
return false;
}
- int size = base::checked_numeric_cast<int>(crl_set_bytes.size());
+ int size = base::checked_cast<int>(crl_set_bytes.size());
if (file_util::WriteFile(save_to, crl_set_bytes.data(), size) != size) {
LOG(WARNING) << "Failed to save new CRL set to disk";
// We don't return false here because we can still use this CRL set. When
@@ -184,7 +184,7 @@
VLOG(1) << "Applied CRL set delta #" << crl_set_->sequence()
<< "->#" << new_crl_set->sequence();
const std::string new_crl_set_bytes = new_crl_set->Serialize();
- int size = base::checked_numeric_cast<int>(new_crl_set_bytes.size());
+ int size = base::checked_cast<int>(new_crl_set_bytes.size());
if (file_util::WriteFile(save_to, new_crl_set_bytes.data(), size) != size) {
LOG(WARNING) << "Failed to save new CRL set to disk";
// We don't return false here because we can still use this CRL set. When

Powered by Google App Engine
This is Rietveld 408576698