PrintTo for FilePath -- Pretty-print when comparing FilePaths in gtest

Used in upcoming (and potentially others).

TEST=Write a test with an error comparing two FilePaths and confirm the paths' values are printed by gtest as opposed to the byte-representation.

Review URL:

git-svn-id: svn:// 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/ b/base/
index 98cbfde..094c699 100644
--- a/base/
+++ b/base/
@@ -1232,3 +1232,7 @@
   return *this;
+void PrintTo(const FilePath& path, std::ostream* out) {
+  *out << path.value();
diff --git a/base/file_path.h b/base/file_path.h
index 3770a8e..09e8269 100644
--- a/base/file_path.h
+++ b/base/file_path.h
@@ -396,6 +396,9 @@
   StringType path_;
+// This is required by googletest to print a readable output on test failures.
+BASE_EXPORT extern void PrintTo(const FilePath& path, std::ostream* out);
 // Macros for string literal initialization of FilePath::CharType[], and for
 // using a FilePath::CharType[] in a printf-style format string.
 #if defined(OS_POSIX)