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

Unified Diff: components/policy/core/browser/url_blacklist_manager.cc

Issue 1475803002: Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: cloud print 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
Index: components/policy/core/browser/url_blacklist_manager.cc
diff --git a/components/policy/core/browser/url_blacklist_manager.cc b/components/policy/core/browser/url_blacklist_manager.cc
index 5d85138e5dff7e9e31b43e671ef66325fb7ee0f7..4b4d35e249dd79e120ed990b5cb309543b4f1dec 100644
--- a/components/policy/core/browser/url_blacklist_manager.cc
+++ b/components/policy/core/browser/url_blacklist_manager.cc
@@ -4,6 +4,10 @@
#include "components/policy/core/browser/url_blacklist_manager.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/location.h"
@@ -137,7 +141,7 @@ struct URLBlacklist::FilterComponents {
std::string scheme;
std::string host;
- uint16 port;
+ uint16_t port;
std::string path;
std::string query;
int number_of_key_value_pairs;
@@ -235,7 +239,7 @@ bool URLBlacklist::FilterToComponents(SegmentURLCallback segment_url,
std::string* scheme,
std::string* host,
bool* match_subdomains,
- uint16* port,
+ uint16_t* port,
std::string* path,
std::string* query) {
url::Parsed parsed;
@@ -298,7 +302,7 @@ bool URLBlacklist::FilterToComponents(SegmentURLCallback segment_url,
&int_port)) {
return false;
}
- if (int_port <= 0 || int_port > kuint16max)
+ if (int_port <= 0 || int_port > std::numeric_limits<uint16_t>::max())
return false;
*port = int_port;
} else {
@@ -328,7 +332,7 @@ scoped_refptr<URLMatcherConditionSet> URLBlacklist::CreateConditionSet(
const std::string& scheme,
const std::string& host,
bool match_subdomains,
- uint16 port,
+ uint16_t port,
const std::string& path,
const std::string& query,
bool allow) {
« no previous file with comments | « cloud_print/gcp20/prototype/command_line_reader.cc ('k') | extensions/common/permissions/usb_device_permission_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698