Update from https://crrev.com/317530

TBR=qsr@chromium.org
BUG=461092

Review URL: https://codereview.chromium.org/952893003
diff --git a/BUILD.gn b/BUILD.gn
index 03e90cb..964a08b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -58,11 +58,11 @@
 
   defines = [ "URL_IMPLEMENTATION" ]
 
-  configs += [ ":url_icu_config" ]
-
-  if (is_win) {
-    cflags = [ "/wd4267" ]  # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
-  }
+  configs += [
+    ":url_icu_config",
+    # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+    "//build/config/compiler:no_size_t_to_int_warning",
+  ]
 
   deps = [
     "//base",
@@ -101,19 +101,15 @@
       "url_util_unittest.cc",
     ]
 
+    # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+    configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+
     #if (is_posix && !is_mac && !is_ios) {
     #  if (use_allocator!="none") {
     #    deps += "//base/allocator"
     #  }
     #}
 
-    if (is_win) {
-      cflags = [
-        # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
-        "/wd4267",
-      ]
-    }
-
     deps = [
       ":url",
       "//base",
diff --git a/url_canon.h b/url_canon.h
index 89e3509..432f291 100644
--- a/url_canon.h
+++ b/url_canon.h
@@ -734,8 +734,8 @@
   // Returns a pointer to a static empty string that is used as a placeholder
   // to indicate a component should be deleted (see below).
   const CHAR* Placeholder() {
-    static const CHAR empty_string = 0;
-    return &empty_string;
+    static const CHAR empty_cstr = 0;
+    return &empty_cstr;
   }
 
   // We support three states: