Internal change

PiperOrigin-RevId: 72256805
Change-Id: I0024bd5918110b74f2700c1c2b99ccf90cee0260
diff --git a/README.google b/README.google
index d0678e1..05b0bd7 100644
--- a/README.google
+++ b/README.google
@@ -24,3 +24,6 @@
 google3 code uses a google3 version of gunit.  When importing, be careful
 to use the current google3 names: testing/base/public/googletest.h and
 testing/base/public/gunit.h .  -- mec
+
+2014-07-30: added google3_additions/googleurl_init.cc, which properly
+initializes googleurl during InitGoogle().
diff --git a/google3_additions/googleurl_init.cc b/google3_additions/googleurl_init.cc
new file mode 100644
index 0000000..e0af8e6
--- /dev/null
+++ b/google3_additions/googleurl_init.cc
@@ -0,0 +1,17 @@
+// googleurl requires that it is properly initialized before it can be
+// used in a multi-threaded context. Invoking googleurl initialization
+// from a module initializer makes sure these functions are called by
+// InitGoogle() at startup.
+
+#include "base/googleinit.h"
+#include "third_party/googleurl/googleurl/src/url_util.h"
+
+namespace {
+
+void InitGoogleUrl() {
+  url_util::Initialize();
+}
+
+}  // namespace
+
+REGISTER_MODULE_INITIALIZER(GoogleUrlInit, { InitGoogleUrl(); });