Moving DEBUG_ALIAS_FOR_CSTR into //base/debug/alias.h

DEBUG_ALIAS_FOR_CSTR was introduced in r527458 as a helper macro
for implementing DEBUG_ALIAS_FOR_ORIGIN.  This CL moves the
DEBUG_ALIAS_FOR_CSTR macrodefinition into //base/debug/alias.h.

Additionally, the CL:

- Uses the DEBUG_ALIAS_FOR_CSTR macro to replace some existing uses of
  base::debug::Alias + strlcpu

- Introduces DEBUG_ALIAS_FOR_GURL macro (and unittests) and uses it in 5
  places (where base::debug::Alias + strlcpy was used before)

Bug: 797968
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I986ea90243f58768177a9ea68a7e2440eaa317c4
Reviewed-on: https://chromium-review.googlesource.com/857815
Commit-Queue: Ɓukasz Anforowicz <[email protected]>
Reviewed-by: vmpstr <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Reviewed-by: Finnur Thorarinsson <[email protected]>
Reviewed-by: Matt Menke <[email protected]>
Reviewed-by: Brett Wilson <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#529155}
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index e42397b..9410c6d 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1271,13 +1271,10 @@
     // Track down the cases when this can happen, and remove this
     // DumpWithoutCrashing() (possibly replacing it with a CHECK).
     NOTREACHED();
-    char extension_id_copy[33];
-    base::strlcpy(extension_id_copy, extension->id().c_str(),
-                  arraysize(extension_id_copy));
+    DEBUG_ALIAS_FOR_CSTR(extension_id_copy, extension->id().c_str(), 33);
     Manifest::Location location = extension->location();
     int creation_flags = extension->creation_flags();
     Manifest::Type type = extension->manifest()->type();
-    base::debug::Alias(extension_id_copy);
     base::debug::Alias(&location);
     base::debug::Alias(&creation_flags);
     base::debug::Alias(&type);