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

Unified Diff: content/browser/geolocation/network_location_request.cc

Issue 1471693006: Remove kint32min. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint3
Patch Set: rebase Created 5 years 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 | « content/browser/geolocation/network_location_request.h ('k') | content/browser/geolocation/wifi_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/network_location_request.cc
diff --git a/content/browser/geolocation/network_location_request.cc b/content/browser/geolocation/network_location_request.cc
index be13119e337c1f98e3eed8b46038b93cba93d1cc..dd23daeeddd22407a9b83da171b5f533e130e594 100644
--- a/content/browser/geolocation/network_location_request.cc
+++ b/content/browser/geolocation/network_location_request.cc
@@ -4,6 +4,9 @@
#include "content/browser/geolocation/network_location_request.h"
+#include <stdint.h>
+
+#include <limits>
#include <set>
#include <string>
@@ -209,11 +212,12 @@ void FormUploadData(const WifiData& wifi_data,
const base::Time& timestamp,
const base::string16& access_token,
std::string* upload_data) {
- int age = kint32min; // Invalid so AddInteger() will ignore.
+ int age = std::numeric_limits<int32_t>::min(); // Invalid so AddInteger()
+ // will ignore.
if (!timestamp.is_null()) {
// Convert absolute timestamps into a relative age.
- int64 delta_ms = (base::Time::Now() - timestamp).InMilliseconds();
- if (delta_ms >= 0 && delta_ms < kint32max)
+ int64_t delta_ms = (base::Time::Now() - timestamp).InMilliseconds();
+ if (delta_ms >= 0 && delta_ms < std::numeric_limits<int32_t>::max())
age = static_cast<int>(delta_ms);
}
@@ -234,7 +238,7 @@ void AddString(const std::string& property_name, const std::string& value,
void AddInteger(const std::string& property_name, int value,
base::DictionaryValue* dict) {
DCHECK(dict);
- if (value != kint32min)
+ if (value != std::numeric_limits<int32_t>::min())
dict->SetInteger(property_name, value);
}
« no previous file with comments | « content/browser/geolocation/network_location_request.h ('k') | content/browser/geolocation/wifi_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698