Reduce number of unnamed-type-template-args violations (mostly when passing values to DCHECK(), ASSERT_EQ(), etc.), generally by naming previously-anonymous enums.  We've decided not to eliminate the warning entirely because doing so is only possible with tons of ugly static_cast<>()s in Mac code.

BUG=92247
TEST=Compiles
Review URL: http://codereview.chromium.org/7605019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99086 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: d643172a8573e7e75f325bec2125de8071bfd0fc
diff --git a/ipc/ipc_channel_posix_unittest.cc b/ipc/ipc_channel_posix_unittest.cc
index 9d9c70a..6f37ae6 100644
--- a/ipc/ipc_channel_posix_unittest.cc
+++ b/ipc/ipc_channel_posix_unittest.cc
@@ -23,9 +23,7 @@
 
 namespace {
 
-enum {
-  QUIT_MESSAGE = 47
-};
+static const uint32 kQuitMessage = 47;
 
 class IPCChannelPosixTestListener : public IPC::Channel::Listener {
  public:
@@ -44,7 +42,7 @@
   virtual ~IPCChannelPosixTestListener() {}
 
   virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
-    EXPECT_EQ(message.type(), QUIT_MESSAGE);
+    EXPECT_EQ(message.type(), kQuitMessage);
     status_ = MESSAGE_RECEIVED;
     QuitRunLoop();
     return true;
@@ -88,7 +86,7 @@
   // The current status of the listener.
   STATUS status_;
   // If |quit_only_on_message_| then the listener will only break out of
-  // the run loop when the QUIT_MESSAGE is received.
+  // the run loop when kQuitMessage is received.
   bool quit_only_on_message_;
 };
 
@@ -144,7 +142,7 @@
   if (mode == IPC::Channel::MODE_NAMED_SERVER) {
     // Only one server at a time. Cleanup garbage if it exists.
     unlink(name.c_str());
-      // Make sure the path we need exists.
+    // Make sure the path we need exists.
     FilePath path(name);
     FilePath dir_path = path.DirName();
     ASSERT_TRUE(file_util::CreateDirectory(dir_path));
@@ -229,8 +227,8 @@
   SpinRunLoop(TestTimeouts::action_max_timeout_ms());
   ASSERT_EQ(IPCChannelPosixTestListener::CONNECTED, listener.status());
   ASSERT_TRUE(channel.HasAcceptedConnection());
-  IPC::Message* message = new IPC::Message(0, // routing_id
-                                           QUIT_MESSAGE, // message type
+  IPC::Message* message = new IPC::Message(0,  // routing_id
+                                           kQuitMessage,  // message type
                                            IPC::Message::PRIORITY_NORMAL);
   channel.Send(message);
   SpinRunLoop(TestTimeouts::action_timeout_ms());
@@ -268,8 +266,8 @@
   SpinRunLoop(TestTimeouts::action_max_timeout_ms());
   ASSERT_EQ(IPCChannelPosixTestListener::CONNECTED, listener.status());
   ASSERT_TRUE(channel.HasAcceptedConnection());
-  IPC::Message* message = new IPC::Message(0, // routing_id
-                                           QUIT_MESSAGE, // message type
+  IPC::Message* message = new IPC::Message(0,  // routing_id
+                                           kQuitMessage,  // message type
                                            IPC::Message::PRIORITY_NORMAL);
   channel.Send(message);
   SpinRunLoop(TestTimeouts::action_timeout_ms());
@@ -327,8 +325,8 @@
   EXPECT_EQ(exit_code, 0);
   ASSERT_EQ(IPCChannelPosixTestListener::DENIED, listener.status());
   ASSERT_TRUE(channel.HasAcceptedConnection());
-  IPC::Message* message = new IPC::Message(0, // routing_id
-                                           QUIT_MESSAGE, // message type
+  IPC::Message* message = new IPC::Message(0,  // routing_id
+                                           kQuitMessage,  // message type
                                            IPC::Message::PRIORITY_NORMAL);
   channel.Send(message);
   SpinRunLoop(TestTimeouts::action_timeout_ms());