Mojo: nuke EnvironmentData

With this change, Mojo applications that link against mojo_environment_chromium
do not need to instantiate mojo::Environment. We rely on AtExitManager for all
finalization of singleton objects. This frees us up to use the familiar
base::Singleton and base::LazyInstance for any such state. Tests can use
ShadowingAtExitManager to clean the environment between test runs.

It becomes a link error to use mojo::Environment if you are not linking against
mojo_environment_standalone. I plan to follow this up with a change that buries
mojo::Environment for the case where you are linking against
mojo_environment_standalone. Ideally, this means no one will ever need to think
about mojo::Environment again.

Review URL: https://codereview.chromium.org/281353005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277265 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp
index aee37a4..5a79230 100644
--- a/mojo/mojo.gyp
+++ b/mojo/mojo.gyp
@@ -338,8 +338,6 @@
         'common/common_type_converters.h',
         'common/data_pipe_utils.cc',
         'common/data_pipe_utils.h',
-        'common/environment_data.cc',
-        'common/environment_data.h',
         'common/handle_watcher.cc',
         'common/handle_watcher.h',
         'common/message_pump_mojo.cc',
@@ -763,6 +761,9 @@
             'libmojo_system_java',
             'mojo_jni_headers',
           ],
+          'defines': [
+            'UNIT_TEST'  # As exported from testing/gtest.gyp:gtest.
+          ],
           'sources': [
             'android/javatests/mojo_test_case.cc',
             'android/javatests/mojo_test_case.h',