CPP: Make r570 compile in Chromium.

This CL ensures that:
- All declarations in headers are made in the i18n::phonenumbers namespace.
- All USE flags/macros are prefixed with I18N_PHONENUMBERS_ to avoid name
  clashes.
- All the code in base/ is actually used (by deleting unused code).
- Outdated occurrences of USE_GOOGLE_BASE don't exist anymore.
- Logging in PhoneNumberUtil is disabled by default (in production). However it
  can be enabled by calling PhoneNumberUtil::SetLogger() as it is now done
  during testing.

BUG=http://crbug.com/236272
R=jia.shao.peng@gmail.com

Review URL: https://codereview.appspot.com/9162043

git-svn-id: http://libphonenumber.googlecode.com/svn/trunk/cpp/test@571 ee073f10-1060-11df-b6a4-87a95322a99c
diff --git a/phonenumbers/asyoutypeformatter_test.cc b/phonenumbers/asyoutypeformatter_test.cc
index 7581f45..8a36e27 100644
--- a/phonenumbers/asyoutypeformatter_test.cc
+++ b/phonenumbers/asyoutypeformatter_test.cc
@@ -24,6 +24,7 @@
 
 #include "phonenumbers/base/logging.h"
 #include "phonenumbers/base/memory/scoped_ptr.h"
+#include "phonenumbers/default_logger.h"
 #include "phonenumbers/phonenumberutil.h"
 #include "phonenumbers/test_util.h"
 
@@ -35,6 +36,7 @@
 class AsYouTypeFormatterTest : public testing::Test {
  protected:
   AsYouTypeFormatterTest() : phone_util_(*PhoneNumberUtil::GetInstance()) {
+    PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
   }
 
   const PhoneMetadata* GetCurrentMetadata() const {
diff --git a/phonenumbers/phonenumbermatcher_test.cc b/phonenumbers/phonenumbermatcher_test.cc
index 5a948e4..f19c637 100644
--- a/phonenumbers/phonenumbermatcher_test.cc
+++ b/phonenumbers/phonenumbermatcher_test.cc
@@ -25,6 +25,7 @@
 #include "phonenumbers/base/basictypes.h"
 #include "phonenumbers/base/memory/scoped_ptr.h"
 #include "phonenumbers/base/memory/singleton.h"
+#include "phonenumbers/default_logger.h"
 #include "phonenumbers/phonenumber.h"
 #include "phonenumbers/phonenumber.pb.h"
 #include "phonenumbers/phonenumbermatch.h"
@@ -77,6 +78,7 @@
                  RegionCode::US(),
                  PhoneNumberMatcher::VALID, 5),
         offset_(0) {
+    PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
   }
 
   bool IsLatinLetter(char32 letter) {
diff --git a/phonenumbers/phonenumberutil_test.cc b/phonenumbers/phonenumberutil_test.cc
index c8115a3..f170a7b 100644
--- a/phonenumbers/phonenumberutil_test.cc
+++ b/phonenumbers/phonenumberutil_test.cc
@@ -30,6 +30,7 @@
 
 #include <gtest/gtest.h>
 
+#include "phonenumbers/default_logger.h"
 #include "phonenumbers/phonemetadata.pb.h"
 #include "phonenumbers/phonenumber.h"
 #include "phonenumbers/phonenumber.pb.h"
@@ -50,6 +51,7 @@
 class PhoneNumberUtilTest : public testing::Test {
  protected:
   PhoneNumberUtilTest() : phone_util_(*PhoneNumberUtil::GetInstance()) {
+    PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
   }
 
   // Wrapper functions for private functions that we want to test.
diff --git a/phonenumbers/shortnumberutil_test.cc b/phonenumbers/shortnumberutil_test.cc
index 663517b..090fdbe 100644
--- a/phonenumbers/shortnumberutil_test.cc
+++ b/phonenumbers/shortnumberutil_test.cc
@@ -16,6 +16,7 @@
 
 #include <gtest/gtest.h>
 
+#include "phonenumbers/default_logger.h"
 #include "phonenumbers/phonenumberutil.h"
 #include "phonenumbers/shortnumberutil.h"
 #include "phonenumbers/test_util.h"
@@ -26,6 +27,7 @@
 class ShortNumberUtilTest : public testing::Test {
  protected:
   ShortNumberUtilTest() : short_util_() {
+    PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
   }
 
   const ShortNumberUtil short_util_;
diff --git a/phonenumbers/utf/unicodetext_test.cc b/phonenumbers/utf/unicodetext_test.cc
index 0e52230..5e51476 100644
--- a/phonenumbers/utf/unicodetext_test.cc
+++ b/phonenumbers/utf/unicodetext_test.cc
@@ -19,7 +19,7 @@
 #include "phonenumbers/utf/unicodetext.h"
 
 namespace i18n {
-namespace unicodetext {
+namespace phonenumbers {
 
 TEST(UnicodeTextTest, Iterator) {
   struct value {
@@ -41,5 +41,5 @@
   }
 }
 
-} // namespace unicodetext
+} // namespace phonenumbers
 } // namespace i18n