Bug 680864 - Remove CHROMIUM_MOZILLA_BUILD ifdefs, since always defined and #ifndef codepaths broken anyway; r=cjones
authorEd Morley <bmo@edmorley.co.uk>
Tue, 23 Aug 2011 11:43:04 +0100
changeset 77016 0f3983da53fb9f3da65630abc6bb495d5d7a663d
parent 77015 4b8e0357f28c532ad49e4940fe5cacb849677633
child 77017 08a3ae5c564a9846cd661b32932243303173c9ae
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs680864
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 680864 - Remove CHROMIUM_MOZILLA_BUILD ifdefs, since always defined and #ifndef codepaths broken anyway; r=cjones
ipc/chromium/chromium-config.mk
ipc/chromium/src/base/at_exit.cc
ipc/chromium/src/base/at_exit.h
ipc/chromium/src/base/atomicops_internals_x86_gcc.h
ipc/chromium/src/base/base_switches.h
ipc/chromium/src/base/basictypes.h
ipc/chromium/src/base/command_line.h
ipc/chromium/src/base/debug_util_posix.cc
ipc/chromium/src/base/histogram.cc
ipc/chromium/src/base/histogram.h
ipc/chromium/src/base/id_map.h
ipc/chromium/src/base/logging.cc
ipc/chromium/src/base/logging.h
ipc/chromium/src/base/message_loop.cc
ipc/chromium/src/base/message_loop.h
ipc/chromium/src/base/message_pump.h
ipc/chromium/src/base/message_pump_default.h
ipc/chromium/src/base/message_pump_libevent.cc
ipc/chromium/src/base/message_pump_libevent.h
ipc/chromium/src/base/pickle.cc
ipc/chromium/src/base/pickle.h
ipc/chromium/src/base/port.h
ipc/chromium/src/base/process_util_linux.cc
ipc/chromium/src/base/process_util_win.cc
ipc/chromium/src/base/shared_memory.h
ipc/chromium/src/base/shared_memory_posix.cc
ipc/chromium/src/base/shared_memory_win.cc
ipc/chromium/src/base/stats_table.cc
ipc/chromium/src/base/string16.cc
ipc/chromium/src/base/string_util.cc
ipc/chromium/src/base/string_util.h
ipc/chromium/src/base/third_party/nspr/prtime.h
ipc/chromium/src/build/build_config.h
ipc/chromium/src/chrome/common/child_process_host.cc
ipc/chromium/src/chrome/common/child_process_host.h
ipc/chromium/src/chrome/common/child_process_info.cc
ipc/chromium/src/chrome/common/child_thread.cc
ipc/chromium/src/chrome/common/child_thread.h
ipc/chromium/src/chrome/common/chrome_paths.cc
ipc/chromium/src/chrome/common/chrome_paths_linux.cc
ipc/chromium/src/chrome/common/env_vars.h
ipc/chromium/src/chrome/common/ipc_channel.h
ipc/chromium/src/chrome/common/ipc_channel_posix.cc
ipc/chromium/src/chrome/common/ipc_channel_posix.h
ipc/chromium/src/chrome/common/ipc_channel_win.cc
ipc/chromium/src/chrome/common/ipc_channel_win.h
ipc/chromium/src/chrome/common/ipc_logging.cc
ipc/chromium/src/chrome/common/ipc_message.cc
ipc/chromium/src/chrome/common/ipc_message.h
ipc/chromium/src/chrome/common/ipc_message_macros.h
ipc/chromium/src/chrome/common/ipc_message_utils.cc
ipc/chromium/src/chrome/common/ipc_message_utils.h
ipc/chromium/src/chrome/common/message_router.cc
ipc/chromium/src/chrome/common/platform_util_mac.mm
ipc/chromium/src/chrome/common/process_watcher.h
ipc/chromium/src/chrome/common/process_watcher_win.cc
ipc/chromium/src/chrome/common/transport_dib_mac.cc
ipc/chromium/src/chrome/common/transport_dib_win.cc
--- a/ipc/chromium/chromium-config.mk
+++ b/ipc/chromium/chromium-config.mk
@@ -43,17 +43,16 @@ ifdef CHROMIUM_CONFIG_INCLUDED
 endif
 
 CHROMIUM_CONFIG_INCLUDED = 1
 
 EXTRA_DEPS += $(topsrcdir)/ipc/chromium/chromium-config.mk
 
 DEFINES += \
   -DEXCLUDE_SKIA_DEPENDENCIES \
-  -DCHROMIUM_MOZILLA_BUILD \
   $(NULL)
 
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/ipc/chromium/src \
   -I$(topsrcdir)/ipc/glue \
   -I$(DEPTH)/ipc/ipdl/_ipdlheaders \
   $(NULL)
 
--- a/ipc/chromium/src/base/at_exit.cc
+++ b/ipc/chromium/src/base/at_exit.cc
@@ -59,16 +59,14 @@ void AtExitManager::ProcessCallbacksNow(
   while (!g_top_manager->stack_.empty()) {
     CallbackAndParam callback_and_param = g_top_manager->stack_.top();
     g_top_manager->stack_.pop();
 
     callback_and_param.func_(callback_and_param.param_);
   }
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 // static
 bool AtExitManager::AlreadyRegistered() {
   return !!g_top_manager;
 }
-#endif
 
 }  // namespace base
--- a/ipc/chromium/src/base/at_exit.h
+++ b/ipc/chromium/src/base/at_exit.h
@@ -46,19 +46,17 @@ class AtExitManager {
   // Registers the specified function to be called at exit. The prototype of
   // the callback function is void func().
   static void RegisterCallback(AtExitCallbackType func, void* param);
 
   // Calls the functions registered with RegisterCallback in LIFO order. It
   // is possible to register new callbacks after calling this function.
   static void ProcessCallbacksNow();
 
-#ifdef CHROMIUM_MOZILLA_BUILD
   static bool AlreadyRegistered();
-#endif
 
  private:
   struct CallbackAndParam {
     CallbackAndParam(AtExitCallbackType func, void* param)
         : func_(func), param_(param) { }
     AtExitCallbackType func_;
     void* param_;
   };
--- a/ipc/chromium/src/base/atomicops_internals_x86_gcc.h
+++ b/ipc/chromium/src/base/atomicops_internals_x86_gcc.h
@@ -191,28 +191,26 @@ inline Atomic64 Barrier_AtomicIncrement(
   }
   return temp + increment;
 }
 
 inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
   *ptr = value;
 }
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
                                        Atomic64 old_value,
                                        Atomic64 new_value) {
   Atomic64 x = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
   /* XXX/cjones: no idea if this is necessary... */
   if (AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug) {
     __asm__ __volatile__("lfence" : : : "memory");
   }
   return x;
 }
-#endif
 
 inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
   *ptr = value;
   MemoryBarrier();
 }
 
 inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
   ATOMICOPS_COMPILER_BARRIER();
--- a/ipc/chromium/src/base/base_switches.h
+++ b/ipc/chromium/src/base/base_switches.h
@@ -2,17 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 // Defines all the "base" command-line switches.
 
 #ifndef BASE_BASE_SWITCHES_H_
 #define BASE_BASE_SWITCHES_H_
 
-#if defined(CHROMIUM_MOZILLA_BUILD) && defined(COMPILER_MSVC)
+#if defined(COMPILER_MSVC)
 #include <string.h>
 #endif
 
 namespace switches {
 
 extern const wchar_t kDebugOnStart[];
 extern const wchar_t kWaitForDebugger[];
 extern const wchar_t kDisableBreakpad[];
--- a/ipc/chromium/src/base/basictypes.h
+++ b/ipc/chromium/src/base/basictypes.h
@@ -1,17 +1,15 @@
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #ifndef BASE_BASICTYPES_H_
 #define BASE_BASICTYPES_H_
 
-#ifdef CHROMIUM_MOZILLA_BUILD
-
 // Chromium includes a prtypes.h also, but it has been modified to include
 // their build_config.h as well. We can therefore test for both to determine
 // if someone screws up the include order.
 #if defined(prtypes_h___) && !defined(BUILD_BUILD_CONFIG_H_)
 #error You_must_include_basictypes.h_before_prtypes.h!
 #endif
 
 #ifndef NO_NSPR_10_SUPPORT
@@ -36,18 +34,16 @@
 #define _INT32
 #define _UINT32
 
 #ifdef _WIN32_SAVE
 #undef _WIN32_SAVE
 #define _WIN32
 #endif
 
-#endif // CHROMIUM_MOZILLA_BUILD
-
 #include <limits.h>         // So we can set the bounds of our types
 #include <stddef.h>         // For size_t
 #include <string.h>         // for memcpy
 
 #include "base/port.h"    // Types that only need exist on certain systems
 
 #ifndef COMPILER_MSVC
 // stdint.h is part of C99 but MSVC doesn't have it.
@@ -58,17 +54,17 @@ typedef signed char         schar;
 typedef signed char         int8;
 typedef short               int16;
 // TODO(mbelshe) Remove these type guards.  These are
 //               temporary to avoid conflicts with npapi.h.
 #ifndef _INT32
 #define _INT32
 typedef int                 int32;
 #endif
-#if !(defined(CHROMIUM_MOZILLA_BUILD) && defined(PROTYPES_H))
+#ifndef PROTYPES_H
 typedef long long           int64;
 #endif
 
 // NOTE: unsigned types are DANGEROUS in loops and other arithmetical
 // places.  Use the signed types unless your variable represents a bit
 // pattern (eg a hash value) or you really need the extra bit.  Do NOT
 // use 'unsigned' to express "this value should always be positive";
 // use assertions for this.
@@ -76,17 +72,17 @@ typedef long long           int64;
 typedef unsigned char      uint8;
 typedef unsigned short     uint16;
 // TODO(mbelshe) Remove these type guards.  These are
 //               temporary to avoid conflicts with npapi.h.
 #ifndef _UINT32
 #define _UINT32
 typedef unsigned int       uint32;
 #endif
-#if !(defined(CHROMIUM_MOZILLA_BUILD) && defined(PROTYPES_H))
+#ifndef PROTYPES_H
 typedef unsigned long long uint64;
 #endif
 
 // A type to represent a Unicode code-point value. As of Unicode 4.0,
 // such values require up to 21 bits.
 // (For type-checking on pointers, make this explicitly signed,
 // and it should always be the signed version of whatever int32 is.)
 typedef signed int         char32;
@@ -99,33 +95,31 @@ const  int8  kint8min   = ((  int8) 0x80
 const  int8  kint8max   = ((  int8) 0x7F);
 const  int16 kint16min  = (( int16) 0x8000);
 const  int16 kint16max  = (( int16) 0x7FFF);
 const  int32 kint32min  = (( int32) 0x80000000);
 const  int32 kint32max  = (( int32) 0x7FFFFFFF);
 const  int64 kint64min  = (( int64) GG_LONGLONG(0x8000000000000000));
 const  int64 kint64max  = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 // Platform- and hardware-dependent printf specifiers
 #  if defined(OS_POSIX)
 #    define __STDC_FORMAT_MACROS 1
 #    include <inttypes.h>           // for 64-bit integer format macros
 #    define PRId64L "I64d"
 #    define PRIu64L "I64u"
 #    define PRIx64L "I64x"
 #  elif defined(OS_WIN)
 #    define PRId64 "I64d"
 #    define PRIu64 "I64u"
 #    define PRIx64 "I64x"
 #    define PRId64L L"I64d"
 #    define PRIu64L L"I64u"
 #    define PRIx64L L"I64x"
 #  endif
-#endif  // defined(CHROMIUM_MOZILLA_BUILD)
 
 // A macro to disallow the copy constructor and operator= functions
 // This should be used in the private: declarations for a class
 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
   TypeName(const TypeName&);               \
   void operator=(const TypeName&)
 
 // An older, deprecated, politically incorrect name for the above.
--- a/ipc/chromium/src/base/command_line.h
+++ b/ipc/chromium/src/base/command_line.h
@@ -60,21 +60,19 @@ class CommandLine {
 
   // Get the singleton CommandLine representing the current process's
   // command line.
   static const CommandLine* ForCurrentProcess() {
     DCHECK(current_process_commandline_);
     return current_process_commandline_;
   }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
   static bool IsInitialized() {
     return !!current_process_commandline_;
   }
-#endif
 
   // Returns true if this command line contains the given switch.
   // (Switch names are case-insensitive.)
   bool HasSwitch(const std::wstring& switch_string) const;
 
   // Returns the value associated with the given switch.  If the
   // switch has no value or isn't present, this method returns
   // the empty string.
--- a/ipc/chromium/src/base/debug_util_posix.cc
+++ b/ipc/chromium/src/base/debug_util_posix.cc
@@ -139,30 +139,10 @@ StackTrace::StackTrace() {
 void StackTrace::PrintBacktrace() {
   fflush(stderr);
 #ifndef ANDROID
   backtrace_symbols_fd(&trace_[0], trace_.size(), STDERR_FILENO);
 #endif
 }
 
 void StackTrace::OutputToStream(std::ostream* os) {
-#ifdef CHROMIUM_MOZILLA_BUILD
   return;
-#else
-  scoped_ptr_malloc<char*> trace_symbols(
-      backtrace_symbols(&trace_[0], trace_.size()));
-
-  // If we can't retrieve the symbols, print an error and just dump the raw
-  // addresses.
-  if (trace_symbols.get() == NULL) {
-    (*os) << "Unable get symbols for backtrace (" << strerror(errno)
-          << "). Dumping raw addresses in trace:\n";
-    for (size_t i = 0; i < trace_.size(); ++i) {
-      (*os) << "\t" << trace_[i] << "\n";
-    }
-  } else {
-    (*os) << "Backtrace:\n";
-    for (size_t i = 0; i < trace_.size(); ++i) {
-      (*os) << "\t" << trace_symbols.get()[i] << "\n";
-    }
-  }
-#endif
 }
--- a/ipc/chromium/src/base/histogram.cc
+++ b/ipc/chromium/src/base/histogram.cc
@@ -16,23 +16,21 @@
 
 #include "base/logging.h"
 #include "base/pickle.h"
 #include "base/string_util.h"
 #include "base/logging.h"
 
 namespace base {
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 #define DVLOG(x) LOG(ERROR)
 #define CHECK_GT DCHECK_GT
 #define CHECK_LT DCHECK_LT
 typedef ::Lock Lock;
 typedef ::AutoLock AutoLock;
-#endif
 
 // Static table of checksums for all possible 8 bit bytes.
 const uint32 Histogram::kCrcTable[256] = {0x0, 0x77073096L, 0xee0e612cL,
 0x990951baL, 0x76dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0xedb8832L,
 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L, 0x9b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, 0x1adad47dL,
 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, 0x646ba8c0L, 0xfd62f97aL,
 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L,
--- a/ipc/chromium/src/base/histogram.h
+++ b/ipc/chromium/src/base/histogram.h
@@ -40,21 +40,17 @@
 #ifndef BASE_METRICS_HISTOGRAM_H_
 #define BASE_METRICS_HISTOGRAM_H_
 #pragma once
 
 #include <map>
 #include <string>
 #include <vector>
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 #define BASE_API
-#else
-#include "base/base_api.h"
-#endif
 #include "testing/gtest/include/gtest/gtest_prod.h"
 #include "base/time.h"
 #include "base/lock.h"
 
 class Pickle;
 
 namespace base {
 //------------------------------------------------------------------------------
--- a/ipc/chromium/src/base/id_map.h
+++ b/ipc/chromium/src/base/id_map.h
@@ -67,29 +67,27 @@ class IDMap {
     }
     data_.erase(i);
   }
 
   bool IsEmpty() const {
     return data_.empty();
   }
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   void Clear() {
     data_.clear();
   }
 
   bool HasData(const T* data) const {
     // XXX would like to use <algorithm> here ...
     for (const_iterator it = begin(); it != end(); ++it)
       if (data == it->second)
         return true;
     return false;
   }
-#endif
 
   T* Lookup(int32 id) const {
     const_iterator i = data_.find(id);
     if (i == data_.end())
       return NULL;
     return i->second;
   }
 
--- a/ipc/chromium/src/base/logging.cc
+++ b/ipc/chromium/src/base/logging.cc
@@ -1,16 +1,13 @@
 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "base/logging.h"
-
-#ifdef CHROMIUM_MOZILLA_BUILD
-
 #include "prmem.h"
 #include "prprf.h"
 #include "base/string_util.h"
 #include "nsXPCOM.h"
 
 namespace mozilla {
 
 Logger::~Logger()
@@ -101,575 +98,8 @@ operator<<(mozilla::Logger& log, const s
 }
 
 mozilla::Logger&
 operator<<(mozilla::Logger& log, void* p)
 {
   log.printf("%p", p);
   return log;
 }
-
-#else
-
-#if defined(OS_WIN)
-#include <windows.h>
-typedef HANDLE FileHandle;
-typedef HANDLE MutexHandle;
-#elif defined(OS_MACOSX)
-#include <CoreFoundation/CoreFoundation.h>
-#include <mach/mach.h>
-#include <mach/mach_time.h>
-#include <mach-o/dyld.h>
-#elif defined(OS_LINUX)
-#include <sys/syscall.h>
-#include <time.h>
-#endif
-
-#if defined(OS_POSIX)
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#define MAX_PATH PATH_MAX
-typedef FILE* FileHandle;
-typedef pthread_mutex_t* MutexHandle;
-#endif
-
-#include <ctime>
-#include <iomanip>
-#include <cstring>
-#include <algorithm>
-
-#include "base/base_switches.h"
-#include "base/command_line.h"
-#include "base/debug_util.h"
-#include "base/lock_impl.h"
-#include "base/string_piece.h"
-#include "base/string_util.h"
-#include "base/sys_string_conversions.h"
-
-namespace logging {
-
-bool g_enable_dcheck = false;
-
-const char* const log_severity_names[LOG_NUM_SEVERITIES] = {
-  "INFO", "WARNING", "ERROR", "ERROR_REPORT", "FATAL" };
-
-int min_log_level = 0;
-LogLockingState lock_log_file = LOCK_LOG_FILE;
-
-// The default set here for logging_destination will only be used if
-// InitLogging is not called.  On Windows, use a file next to the exe;
-// on POSIX platforms, where it may not even be possible to locate the
-// executable on disk, use stderr.
-#if defined(OS_WIN)
-LoggingDestination logging_destination = LOG_ONLY_TO_FILE;
-#elif defined(OS_POSIX)
-LoggingDestination logging_destination = LOG_ONLY_TO_SYSTEM_DEBUG_LOG;
-#endif
-
-const int kMaxFilteredLogLevel = LOG_WARNING;
-std::string* log_filter_prefix;
-
-// For LOG_ERROR and above, always print to stderr.
-const int kAlwaysPrintErrorLevel = LOG_ERROR;
-
-// Which log file to use? This is initialized by InitLogging or
-// will be lazily initialized to the default value when it is
-// first needed.
-#if defined(OS_WIN)
-typedef wchar_t PathChar;
-typedef std::wstring PathString;
-#else
-typedef char PathChar;
-typedef std::string PathString;
-#endif
-PathString* log_file_name = NULL;
-
-// this file is lazily opened and the handle may be NULL
-FileHandle log_file = NULL;
-
-// what should be prepended to each message?
-bool log_process_id = false;
-bool log_thread_id = false;
-bool log_timestamp = true;
-bool log_tickcount = false;
-
-// An assert handler override specified by the client to be called instead of
-// the debug message dialog and process termination.
-LogAssertHandlerFunction log_assert_handler = NULL;
-// An report handler override specified by the client to be called instead of
-// the debug message dialog.
-LogReportHandlerFunction log_report_handler = NULL;
-
-// The lock is used if log file locking is false. It helps us avoid problems
-// with multiple threads writing to the log file at the same time.  Use
-// LockImpl directly instead of using Lock, because Lock makes logging calls.
-static LockImpl* log_lock = NULL;
-
-// When we don't use a lock, we are using a global mutex. We need to do this
-// because LockFileEx is not thread safe.
-#if defined(OS_WIN)
-MutexHandle log_mutex = NULL;
-#elif defined(OS_POSIX)
-pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
-
-// Helper functions to wrap platform differences.
-
-int32 CurrentProcessId() {
-#if defined(OS_WIN)
-  return GetCurrentProcessId();
-#elif defined(OS_POSIX)
-  return getpid();
-#endif
-}
-
-int32 CurrentThreadId() {
-#if defined(OS_WIN)
-  return GetCurrentThreadId();
-#elif defined(OS_MACOSX)
-  return mach_thread_self();
-#elif defined(OS_LINUX)
-  return syscall(__NR_gettid);
-#endif
-}
-
-uint64 TickCount() {
-#if defined(OS_WIN)
-  return GetTickCount();
-#elif defined(OS_MACOSX)
-  return mach_absolute_time();
-#elif defined(OS_LINUX)
-  struct timespec ts;
-  clock_gettime(CLOCK_MONOTONIC, &ts);
-
-  uint64 absolute_micro =
-    static_cast<int64>(ts.tv_sec) * 1000000 +
-    static_cast<int64>(ts.tv_nsec) / 1000;
-
-  return absolute_micro;
-#endif
-}
-
-void CloseFile(FileHandle log) {
-#if defined(OS_WIN)
-  CloseHandle(log);
-#else
-  fclose(log);
-#endif
-}
-
-void DeleteFilePath(const PathString& log_name) {
-#if defined(OS_WIN)
-  DeleteFile(log_name.c_str());
-#else
-  unlink(log_name.c_str());
-#endif
-}
-
-// Called by logging functions to ensure that debug_file is initialized
-// and can be used for writing. Returns false if the file could not be
-// initialized. debug_file will be NULL in this case.
-bool InitializeLogFileHandle() {
-  if (log_file)
-    return true;
-
-  if (!log_file_name) {
-    // Nobody has called InitLogging to specify a debug log file, so here we
-    // initialize the log file name to a default.
-#if defined(OS_WIN)
-    // On Windows we use the same path as the exe.
-    wchar_t module_name[MAX_PATH];
-    GetModuleFileName(NULL, module_name, MAX_PATH);
-    log_file_name = new std::wstring(module_name);
-    std::wstring::size_type last_backslash =
-        log_file_name->rfind('\\', log_file_name->size());
-    if (last_backslash != std::wstring::npos)
-      log_file_name->erase(last_backslash + 1);
-    *log_file_name += L"debug.log";
-#elif defined(OS_POSIX)
-    // On other platforms we just use the current directory.
-    log_file_name = new std::string("debug.log");
-#endif
-  }
-
-  if (logging_destination == LOG_ONLY_TO_FILE ||
-      logging_destination == LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG) {
-#if defined(OS_WIN)
-    log_file = CreateFile(log_file_name->c_str(), GENERIC_WRITE,
-                          FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
-                          OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-    if (log_file == INVALID_HANDLE_VALUE || log_file == NULL) {
-      // try the current directory
-      log_file = CreateFile(L".\\debug.log", GENERIC_WRITE,
-                            FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
-                            OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-      if (log_file == INVALID_HANDLE_VALUE || log_file == NULL) {
-        log_file = NULL;
-        return false;
-      }
-    }
-    SetFilePointer(log_file, 0, 0, FILE_END);
-#elif defined(OS_POSIX)
-    log_file = fopen(log_file_name->c_str(), "a");
-    if (log_file == NULL)
-      return false;
-#endif
-  }
-
-  return true;
-}
-
-void InitLogMutex() {
-#if defined(OS_WIN)
-  if (!log_mutex) {
-    // \ is not a legal character in mutex names so we replace \ with /
-    std::wstring safe_name(*log_file_name);
-    std::replace(safe_name.begin(), safe_name.end(), '\\', '/');
-    std::wstring t(L"Global\\");
-    t.append(safe_name);
-    log_mutex = ::CreateMutex(NULL, FALSE, t.c_str());
-  }
-#elif defined(OS_POSIX)
-  // statically initialized
-#endif
-}
-
-void InitLogging(const PathChar* new_log_file, LoggingDestination logging_dest,
-                 LogLockingState lock_log, OldFileDeletionState delete_old) {
-  g_enable_dcheck =
-      CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableDCHECK);
-
-  if (log_file) {
-    // calling InitLogging twice or after some log call has already opened the
-    // default log file will re-initialize to the new options
-    CloseFile(log_file);
-    log_file = NULL;
-  }
-
-  lock_log_file = lock_log;
-  logging_destination = logging_dest;
-
-  // ignore file options if logging is disabled or only to system
-  if (logging_destination == LOG_NONE ||
-      logging_destination == LOG_ONLY_TO_SYSTEM_DEBUG_LOG)
-    return;
-
-  if (!log_file_name)
-    log_file_name = new PathString();
-  *log_file_name = new_log_file;
-  if (delete_old == DELETE_OLD_LOG_FILE)
-    DeleteFilePath(*log_file_name);
-
-  if (lock_log_file == LOCK_LOG_FILE) {
-    InitLogMutex();
-  } else if (!log_lock) {
-    log_lock = new LockImpl();
-  }
-
-  InitializeLogFileHandle();
-}
-
-void SetMinLogLevel(int level) {
-  min_log_level = level;
-}
-
-int GetMinLogLevel() {
-  return min_log_level;
-}
-
-void SetLogFilterPrefix(const char* filter)  {
-  if (log_filter_prefix) {
-    delete log_filter_prefix;
-    log_filter_prefix = NULL;
-  }
-
-  if (filter)
-    log_filter_prefix = new std::string(filter);
-}
-
-void SetLogItems(bool enable_process_id, bool enable_thread_id,
-                 bool enable_timestamp, bool enable_tickcount) {
-  log_process_id = enable_process_id;
-  log_thread_id = enable_thread_id;
-  log_timestamp = enable_timestamp;
-  log_tickcount = enable_tickcount;
-}
-
-void SetLogAssertHandler(LogAssertHandlerFunction handler) {
-  log_assert_handler = handler;
-}
-
-void SetLogReportHandler(LogReportHandlerFunction handler) {
-  log_report_handler = handler;
-}
-
-// Displays a message box to the user with the error message in it. For
-// Windows programs, it's possible that the message loop is messed up on
-// a fatal error, and creating a MessageBox will cause that message loop
-// to be run. Instead, we try to spawn another process that displays its
-// command line. We look for "Debug Message.exe" in the same directory as
-// the application. If it exists, we use it, otherwise, we use a regular
-// message box.
-void DisplayDebugMessage(const std::string& str) {
-  if (str.empty())
-    return;
-
-#if defined(OS_WIN)
-  // look for the debug dialog program next to our application
-  wchar_t prog_name[MAX_PATH];
-  GetModuleFileNameW(NULL, prog_name, MAX_PATH);
-  wchar_t* backslash = wcsrchr(prog_name, '\\');
-  if (backslash)
-    backslash[1] = 0;
-  wcscat_s(prog_name, MAX_PATH, L"debug_message.exe");
-
-  std::wstring cmdline = base::SysUTF8ToWide(str);
-  if (cmdline.empty())
-    return;
-
-  STARTUPINFO startup_info;
-  memset(&startup_info, 0, sizeof(startup_info));
-  startup_info.cb = sizeof(startup_info);
-
-  PROCESS_INFORMATION process_info;
-  if (CreateProcessW(prog_name, &cmdline[0], NULL, NULL, false, 0, NULL,
-                     NULL, &startup_info, &process_info)) {
-    WaitForSingleObject(process_info.hProcess, INFINITE);
-    CloseHandle(process_info.hThread);
-    CloseHandle(process_info.hProcess);
-  } else {
-    // debug process broken, let's just do a message box
-    MessageBoxW(NULL, &cmdline[0], L"Fatal error",
-                MB_OK | MB_ICONHAND | MB_TOPMOST);
-  }
-#else
-  fprintf(stderr, "%s\n", str.c_str());
-#endif
-}
-
-#if defined(OS_WIN)
-LogMessage::SaveLastError::SaveLastError() : last_error_(::GetLastError()) {
-}
-
-LogMessage::SaveLastError::~SaveLastError() {
-  ::SetLastError(last_error_);
-}
-#endif  // defined(OS_WIN)
-
-LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
-                       int ctr)
-    : severity_(severity) {
-  Init(file, line);
-}
-
-LogMessage::LogMessage(const char* file, int line, const CheckOpString& result)
-    : severity_(LOG_FATAL) {
-  Init(file, line);
-  stream_ << "Check failed: " << (*result.str_);
-}
-
-LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
-                       const CheckOpString& result)
-    : severity_(severity) {
-  Init(file, line);
-  stream_ << "Check failed: " << (*result.str_);
-}
-
-LogMessage::LogMessage(const char* file, int line)
-     : severity_(LOG_INFO) {
-  Init(file, line);
-}
-
-LogMessage::LogMessage(const char* file, int line, LogSeverity severity)
-    : severity_(severity) {
-  Init(file, line);
-}
-
-// writes the common header info to the stream
-void LogMessage::Init(const char* file, int line) {
-  // log only the filename
-  const char* last_slash = strrchr(file, '\\');
-  if (last_slash)
-    file = last_slash + 1;
-
-  // TODO(darin): It might be nice if the columns were fixed width.
-
-  stream_ <<  '[';
-  if (log_process_id)
-    stream_ << CurrentProcessId() << ':';
-  if (log_thread_id)
-    stream_ << CurrentThreadId() << ':';
-  if (log_timestamp) {
-     time_t t = time(NULL);
-#if _MSC_VER >= 1400
-    struct tm local_time = {0};
-    localtime_s(&local_time, &t);
-    struct tm* tm_time = &local_time;
-#else
-    struct tm* tm_time = localtime(&t);
-#endif
-    stream_ << std::setfill('0')
-            << std::setw(2) << 1 + tm_time->tm_mon
-            << std::setw(2) << tm_time->tm_mday
-            << '/'
-            << std::setw(2) << tm_time->tm_hour
-            << std::setw(2) << tm_time->tm_min
-            << std::setw(2) << tm_time->tm_sec
-            << ':';
-  }
-  if (log_tickcount)
-    stream_ << TickCount() << ':';
-  stream_ << log_severity_names[severity_] << ":" << file <<
-             "(" << line << ")] ";
-
-  message_start_ = stream_.tellp();
-}
-
-LogMessage::~LogMessage() {
-  // TODO(brettw) modify the macros so that nothing is executed when the log
-  // level is too high.
-  if (severity_ < min_log_level)
-    return;
-
-  std::string str_newline(stream_.str());
-#if defined(OS_WIN)
-  str_newline.append("\r\n");
-#else
-  str_newline.append("\n");
-#endif
-
-  if (log_filter_prefix && severity_ <= kMaxFilteredLogLevel &&
-      str_newline.compare(message_start_, log_filter_prefix->size(),
-                          log_filter_prefix->data()) != 0) {
-    return;
-  }
-
-  if (logging_destination == LOG_ONLY_TO_SYSTEM_DEBUG_LOG ||
-      logging_destination == LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG) {
-#if defined(OS_WIN)
-    OutputDebugStringA(str_newline.c_str());
-    if (severity_ >= kAlwaysPrintErrorLevel)
-#endif
-    // TODO(erikkay): this interferes with the layout tests since it grabs
-    // stderr and stdout and diffs them against known data. Our info and warn
-    // logs add noise to that.  Ideally, the layout tests would set the log
-    // level to ignore anything below error.  When that happens, we should
-    // take this fprintf out of the #else so that Windows users can benefit
-    // from the output when running tests from the command-line.  In the
-    // meantime, we leave this in for Mac and Linux, but until this is fixed
-    // they won't be able to pass any layout tests that have info or warn logs.
-    // See http://b/1343647
-    fprintf(stderr, "%s", str_newline.c_str());
-  } else if (severity_ >= kAlwaysPrintErrorLevel) {
-    // When we're only outputting to a log file, above a certain log level, we
-    // should still output to stderr so that we can better detect and diagnose
-    // problems with unit tests, especially on the buildbots.
-    fprintf(stderr, "%s", str_newline.c_str());
-  }
-
-  // write to log file
-  if (logging_destination != LOG_NONE &&
-      logging_destination != LOG_ONLY_TO_SYSTEM_DEBUG_LOG &&
-      InitializeLogFileHandle()) {
-    // We can have multiple threads and/or processes, so try to prevent them
-    // from clobbering each other's writes.
-    if (lock_log_file == LOCK_LOG_FILE) {
-      // Ensure that the mutex is initialized in case the client app did not
-      // call InitLogging. This is not thread safe. See below.
-      InitLogMutex();
-
-#if defined(OS_WIN)
-      DWORD r = ::WaitForSingleObject(log_mutex, INFINITE);
-      DCHECK(r != WAIT_ABANDONED);
-#elif defined(OS_POSIX)
-      pthread_mutex_lock(&log_mutex);
-#endif
-    } else {
-      // use the lock
-      if (!log_lock) {
-        // The client app did not call InitLogging, and so the lock has not
-        // been created. We do this on demand, but if two threads try to do
-        // this at the same time, there will be a race condition to create
-        // the lock. This is why InitLogging should be called from the main
-        // thread at the beginning of execution.
-        log_lock = new LockImpl();
-      }
-      log_lock->Lock();
-    }
-
-#if defined(OS_WIN)
-    SetFilePointer(log_file, 0, 0, SEEK_END);
-    DWORD num_written;
-    WriteFile(log_file,
-              static_cast<const void*>(str_newline.c_str()),
-              static_cast<DWORD>(str_newline.length()),
-              &num_written,
-              NULL);
-#else
-    fprintf(log_file, "%s", str_newline.c_str());
-#endif
-
-    if (lock_log_file == LOCK_LOG_FILE) {
-#if defined(OS_WIN)
-      ReleaseMutex(log_mutex);
-#elif defined(OS_POSIX)
-      pthread_mutex_unlock(&log_mutex);
-#endif
-    } else {
-      log_lock->Unlock();
-    }
-  }
-
-  if (severity_ == LOG_FATAL) {
-    // display a message or break into the debugger on a fatal error
-    if (DebugUtil::BeingDebugged()) {
-      DebugUtil::BreakDebugger();
-    } else {
-#ifndef NDEBUG
-      // Dump a stack trace on a fatal.
-      StackTrace trace;
-      stream_ << "\n";  // Newline to separate from log message.
-      trace.OutputToStream(&stream_);
-#endif
-
-      if (log_assert_handler) {
-        // make a copy of the string for the handler out of paranoia
-        log_assert_handler(std::string(stream_.str()));
-      } else {
-        // Don't use the string with the newline, get a fresh version to send to
-        // the debug message process. We also don't display assertions to the
-        // user in release mode. The enduser can't do anything with this
-        // information, and displaying message boxes when the application is
-        // hosed can cause additional problems.
-#ifndef NDEBUG
-        DisplayDebugMessage(stream_.str());
-#endif
-        // Crash the process to generate a dump.
-        DebugUtil::BreakDebugger();
-      }
-    }
-  } else if (severity_ == LOG_ERROR_REPORT) {
-    // We are here only if the user runs with --enable-dcheck in release mode.
-    if (log_report_handler) {
-      log_report_handler(std::string(stream_.str()));
-    } else {
-      DisplayDebugMessage(stream_.str());
-    }
-  }
-}
-
-void CloseLogFile() {
-  if (!log_file)
-    return;
-
-  CloseFile(log_file);
-  log_file = NULL;
-}
-
-}  // namespace logging
-
-std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
-  return out << base::SysWideToUTF8(std::wstring(wstr));
-}
-
-#endif // CHROMIUM_MOZILLA_BUILD
--- a/ipc/chromium/src/base/logging.h
+++ b/ipc/chromium/src/base/logging.h
@@ -4,19 +4,16 @@
 
 #ifndef BASE_LOGGING_H_
 #define BASE_LOGGING_H_
 
 #include <string>
 #include <cstring>
 
 #include "base/basictypes.h"
-
-#ifdef CHROMIUM_MOZILLA_BUILD
-
 #include "prlog.h"
 
 // Replace the Chromium logging code with NSPR-based logging code and
 // some C++ wrappers to emulate std::ostream
 
 #define ERROR 0
 
 namespace mozilla {
@@ -118,645 +115,9 @@ const mozilla::EmptyLog& operator <<(con
 #define DCHECK_GE(v1, v2) DCHECK((v1) >= (v2))
 #define DCHECK_GT(v1, v2) DCHECK((v1) > (v2))
 
 #ifdef assert
 #undef assert
 #endif
 #define assert DLOG_ASSERT
 
-#else
-
-#include <sstream>
-
-//
-// Optional message capabilities
-// -----------------------------
-// Assertion failed messages and fatal errors are displayed in a dialog box
-// before the application exits. However, running this UI creates a message
-// loop, which causes application messages to be processed and potentially
-// dispatched to existing application windows. Since the application is in a
-// bad state when this assertion dialog is displayed, these messages may not
-// get processed and hang the dialog, or the application might go crazy.
-//
-// Therefore, it can be beneficial to display the error dialog in a separate
-// process from the main application. When the logging system needs to display
-// a fatal error dialog box, it will look for a program called
-// "DebugMessage.exe" in the same directory as the application executable. It
-// will run this application with the message as the command line, and will
-// not include the name of the application as is traditional for easier
-// parsing.
-//
-// The code for DebugMessage.exe is only one line. In WinMain, do:
-//   MessageBox(NULL, GetCommandLineW(), L"Fatal Error", 0);
-//
-// If DebugMessage.exe is not found, the logging code will use a normal
-// MessageBox, potentially causing the problems discussed above.
-
-
-// Instructions
-// ------------
-//
-// Make a bunch of macros for logging.  The way to log things is to stream
-// things to LOG(<a particular severity level>).  E.g.,
-//
-//   LOG(INFO) << "Found " << num_cookies << " cookies";
-//
-// You can also do conditional logging:
-//
-//   LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
-//
-// The above will cause log messages to be output on the 1st, 11th, 21st, ...
-// times it is executed.  Note that the special COUNTER value is used to
-// identify which repetition is happening.
-//
-// The CHECK(condition) macro is active in both debug and release builds and
-// effectively performs a LOG(FATAL) which terminates the process and
-// generates a crashdump unless a debugger is attached.
-//
-// There are also "debug mode" logging macros like the ones above:
-//
-//   DLOG(INFO) << "Found cookies";
-//
-//   DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
-//
-// All "debug mode" logging is compiled away to nothing for non-debug mode
-// compiles.  LOG_IF and development flags also work well together
-// because the code can be compiled away sometimes.
-//
-// We also have
-//
-//   LOG_ASSERT(assertion);
-//   DLOG_ASSERT(assertion);
-//
-// which is syntactic sugar for {,D}LOG_IF(FATAL, assert fails) << assertion;
-//
-// We also override the standard 'assert' to use 'DLOG_ASSERT'.
-//
-// The supported severity levels for macros that allow you to specify one
-// are (in increasing order of severity) INFO, WARNING, ERROR, ERROR_REPORT,
-// and FATAL.
-//
-// Very important: logging a message at the FATAL severity level causes
-// the program to terminate (after the message is logged).
-//
-// Note the special severity of ERROR_REPORT only available/relevant in normal
-// mode, which displays error dialog without terminating the program. There is
-// no error dialog for severity ERROR or below in normal mode.
-//
-// There is also the special severity of DFATAL, which logs FATAL in
-// debug mode, ERROR_REPORT in normal mode.
-
-namespace logging {
-
-// Where to record logging output? A flat file and/or system debug log via
-// OutputDebugString. Defaults on Windows to LOG_ONLY_TO_FILE, and on
-// POSIX to LOG_ONLY_TO_SYSTEM_DEBUG_LOG (aka stderr).
-enum LoggingDestination { LOG_NONE,
-                          LOG_ONLY_TO_FILE,
-                          LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
-                          LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG };
-
-// Indicates that the log file should be locked when being written to.
-// Often, there is no locking, which is fine for a single threaded program.
-// If logging is being done from multiple threads or there can be more than
-// one process doing the logging, the file should be locked during writes to
-// make each log outut atomic. Other writers will block.
-//
-// All processes writing to the log file must have their locking set for it to
-// work properly. Defaults to DONT_LOCK_LOG_FILE.
-enum LogLockingState { LOCK_LOG_FILE, DONT_LOCK_LOG_FILE };
-
-// On startup, should we delete or append to an existing log file (if any)?
-// Defaults to APPEND_TO_OLD_LOG_FILE.
-enum OldFileDeletionState { DELETE_OLD_LOG_FILE, APPEND_TO_OLD_LOG_FILE };
-
-// Sets the log file name and other global logging state. Calling this function
-// is recommended, and is normally done at the beginning of application init.
-// If you don't call it, all the flags will be initialized to their default
-// values, and there is a race condition that may leak a critical section
-// object if two threads try to do the first log at the same time.
-// See the definition of the enums above for descriptions and default values.
-//
-// The default log file is initialized to "debug.log" in the application
-// directory. You probably don't want this, especially since the program
-// directory may not be writable on an enduser's system.
-#if defined(OS_WIN)
-void InitLogging(const wchar_t* log_file, LoggingDestination logging_dest,
-                 LogLockingState lock_log, OldFileDeletionState delete_old);
-#elif defined(OS_POSIX)
-// TODO(avi): do we want to do a unification of character types here?
-void InitLogging(const char* log_file, LoggingDestination logging_dest,
-                 LogLockingState lock_log, OldFileDeletionState delete_old);
-#endif
-
-// Sets the log level. Anything at or above this level will be written to the
-// log file/displayed to the user (if applicable). Anything below this level
-// will be silently ignored. The log level defaults to 0 (everything is logged)
-// if this function is not called.
-void SetMinLogLevel(int level);
-
-// Gets the current log level.
-int GetMinLogLevel();
-
-// Sets the log filter prefix.  Any log message below LOG_ERROR severity that
-// doesn't start with this prefix with be silently ignored.  The filter defaults
-// to NULL (everything is logged) if this function is not called.  Messages
-// with severity of LOG_ERROR or higher will not be filtered.
-void SetLogFilterPrefix(const char* filter);
-
-// Sets the common items you want to be prepended to each log message.
-// process and thread IDs default to off, the timestamp defaults to on.
-// If this function is not called, logging defaults to writing the timestamp
-// only.
-void SetLogItems(bool enable_process_id, bool enable_thread_id,
-                 bool enable_timestamp, bool enable_tickcount);
-
-// Sets the Log Assert Handler that will be used to notify of check failures.
-// The default handler shows a dialog box and then terminate the process,
-// however clients can use this function to override with their own handling
-// (e.g. a silent one for Unit Tests)
-typedef void (*LogAssertHandlerFunction)(const std::string& str);
-void SetLogAssertHandler(LogAssertHandlerFunction handler);
-// Sets the Log Report Handler that will be used to notify of check failures
-// in non-debug mode. The default handler shows a dialog box and continues
-// the execution, however clients can use this function to override with their
-// own handling.
-typedef void (*LogReportHandlerFunction)(const std::string& str);
-void SetLogReportHandler(LogReportHandlerFunction handler);
-
-typedef int LogSeverity;
-const LogSeverity LOG_INFO = 0;
-const LogSeverity LOG_WARNING = 1;
-const LogSeverity LOG_ERROR = 2;
-const LogSeverity LOG_ERROR_REPORT = 3;
-const LogSeverity LOG_FATAL = 4;
-const LogSeverity LOG_NUM_SEVERITIES = 5;
-
-// LOG_DFATAL_LEVEL is LOG_FATAL in debug mode, ERROR_REPORT in normal mode
-#ifdef NDEBUG
-const LogSeverity LOG_DFATAL_LEVEL = LOG_ERROR_REPORT;
-#else
-const LogSeverity LOG_DFATAL_LEVEL = LOG_FATAL;
-#endif
-
-// A few definitions of macros that don't generate much code. These are used
-// by LOG() and LOG_IF, etc. Since these are used all over our code, it's
-// better to have compact code for these operations.
-#define COMPACT_GOOGLE_LOG_INFO \
-  logging::LogMessage(__FILE__, __LINE__)
-#define COMPACT_GOOGLE_LOG_WARNING \
-  logging::LogMessage(__FILE__, __LINE__, logging::LOG_WARNING)
-#define COMPACT_GOOGLE_LOG_ERROR \
-  logging::LogMessage(__FILE__, __LINE__, logging::LOG_ERROR)
-#define COMPACT_GOOGLE_LOG_ERROR_REPORT \
-  logging::LogMessage(__FILE__, __LINE__, logging::LOG_ERROR_REPORT)
-#define COMPACT_GOOGLE_LOG_FATAL \
-  logging::LogMessage(__FILE__, __LINE__, logging::LOG_FATAL)
-#define COMPACT_GOOGLE_LOG_DFATAL \
-  logging::LogMessage(__FILE__, __LINE__, logging::LOG_DFATAL_LEVEL)
-
-// wingdi.h defines ERROR to be 0. When we call LOG(ERROR), it gets
-// substituted with 0, and it expands to COMPACT_GOOGLE_LOG_0. To allow us
-// to keep using this syntax, we define this macro to do the same thing
-// as COMPACT_GOOGLE_LOG_ERROR, and also define ERROR the same way that
-// the Windows SDK does for consistency.
-#define ERROR 0
-#define COMPACT_GOOGLE_LOG_0 \
-  logging::LogMessage(__FILE__, __LINE__, logging::LOG_ERROR)
-
-// We use the preprocessor's merging operator, "##", so that, e.g.,
-// LOG(INFO) becomes the token COMPACT_GOOGLE_LOG_INFO.  There's some funny
-// subtle difference between ostream member streaming functions (e.g.,
-// ostream::operator<<(int) and ostream non-member streaming functions
-// (e.g., ::operator<<(ostream&, string&): it turns out that it's
-// impossible to stream something like a string directly to an unnamed
-// ostream. We employ a neat hack by calling the stream() member
-// function of LogMessage which seems to avoid the problem.
-
-#define LOG(severity) COMPACT_GOOGLE_LOG_ ## severity.stream()
-#define SYSLOG(severity) LOG(severity)
-
-#define LOG_IF(severity, condition) \
-  !(condition) ? (void) 0 : logging::LogMessageVoidify() & LOG(severity)
-#define SYSLOG_IF(severity, condition) LOG_IF(severity, condition)
-
-#define LOG_ASSERT(condition)  \
-  LOG_IF(FATAL, !(condition)) << "Assert failed: " #condition ". "
-#define SYSLOG_ASSERT(condition) \
-  SYSLOG_IF(FATAL, !(condition)) << "Assert failed: " #condition ". "
-
-// CHECK dies with a fatal error if condition is not true.  It is *not*
-// controlled by NDEBUG, so the check will be executed regardless of
-// compilation mode.
-#define CHECK(condition) \
-  LOG_IF(FATAL, !(condition)) << "Check failed: " #condition ". "
-
-// A container for a string pointer which can be evaluated to a bool -
-// true iff the pointer is NULL.
-struct CheckOpString {
-  CheckOpString(std::string* str) : str_(str) { }
-  // No destructor: if str_ is non-NULL, we're about to LOG(FATAL),
-  // so there's no point in cleaning up str_.
-  operator bool() const { return str_ != NULL; }
-  std::string* str_;
-};
-
-// Build the error message string.  This is separate from the "Impl"
-// function template because it is not performance critical and so can
-// be out of line, while the "Impl" code should be inline.
-template<class t1, class t2>
-std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
-  std::ostringstream ss;
-  ss << names << " (" << v1 << " vs. " << v2 << ")";
-  std::string* msg = new std::string(ss.str());
-  return msg;
-}
-
-extern std::string* MakeCheckOpStringIntInt(int v1, int v2, const char* names);
-
-template<int, int>
-std::string* MakeCheckOpString(const int& v1,
-                               const int& v2,
-                               const char* names) {
-  return MakeCheckOpStringIntInt(v1, v2, names);
-}
-
-// Plus some debug-logging macros that get compiled to nothing for production
-//
-// DEBUG_MODE is for uses like
-//   if (DEBUG_MODE) foo.CheckThatFoo();
-// instead of
-//   #ifndef NDEBUG
-//     foo.CheckThatFoo();
-//   #endif
-
-#ifdef OFFICIAL_BUILD
-// We want to have optimized code for an official build so we remove DLOGS and
-// DCHECK from the executable.
-
-#define DLOG(severity) \
-  true ? (void) 0 : logging::LogMessageVoidify() & LOG(severity)
-
-#define DLOG_IF(severity, condition) \
-  true ? (void) 0 : logging::LogMessageVoidify() & LOG(severity)
-
-#define DLOG_ASSERT(condition) \
-  true ? (void) 0 : LOG_ASSERT(condition)
-
-enum { DEBUG_MODE = 0 };
-
-// This macro can be followed by a sequence of stream parameters in
-// non-debug mode. The DCHECK and friends macros use this so that
-// the expanded expression DCHECK(foo) << "asdf" is still syntactically
-// valid, even though the expression will get optimized away.
-// In order to avoid variable unused warnings for code that only uses a
-// variable in a CHECK, we make sure to use the macro arguments.
-#define NDEBUG_EAT_STREAM_PARAMETERS \
-  logging::LogMessage(__FILE__, __LINE__).stream()
-
-#define DCHECK(condition) \
-  while (false && (condition)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_EQ(val1, val2) \
-  while (false && (val1) == (val2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_NE(val1, val2) \
-  while (false && (val1) == (val2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_LE(val1, val2) \
-  while (false && (val1) == (val2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_LT(val1, val2) \
-  while (false && (val1) == (val2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_GE(val1, val2) \
-  while (false && (val1) == (val2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_GT(val1, val2) \
-  while (false && (val1) == (val2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_STREQ(str1, str2) \
-  while (false && (str1) == (str2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_STRCASEEQ(str1, str2) \
-  while (false && (str1) == (str2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_STRNE(str1, str2) \
-  while (false && (str1) == (str2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_STRCASENE(str1, str2) \
-  while (false && (str1) == (str2)) NDEBUG_EAT_STREAM_PARAMETERS
-
-#else
-#ifndef NDEBUG
-// On a regular debug build, we want to have DCHECKS and DLOGS enabled.
-
-#define DLOG(severity) LOG(severity)
-#define DLOG_IF(severity, condition) LOG_IF(severity, condition)
-#define DLOG_ASSERT(condition) LOG_ASSERT(condition)
-
-// debug-only checking.  not executed in NDEBUG mode.
-enum { DEBUG_MODE = 1 };
-#define DCHECK(condition) \
-  LOG_IF(FATAL, !(condition)) << "Check failed: " #condition ". "
-
-// Helper macro for binary operators.
-// Don't use this macro directly in your code, use DCHECK_EQ et al below.
-#define DCHECK_OP(name, op, val1, val2)  \
-  if (logging::CheckOpString _result = \
-      logging::Check##name##Impl((val1), (val2), #val1 " " #op " " #val2)) \
-    logging::LogMessage(__FILE__, __LINE__, _result).stream()
-
-// Helper functions for string comparisons.
-// To avoid bloat, the definitions are in logging.cc.
-#define DECLARE_DCHECK_STROP_IMPL(func, expected) \
-  std::string* Check##func##expected##Impl(const char* s1, \
-                                           const char* s2, \
-                                           const char* names);
-DECLARE_DCHECK_STROP_IMPL(strcmp, true)
-DECLARE_DCHECK_STROP_IMPL(strcmp, false)
-DECLARE_DCHECK_STROP_IMPL(_stricmp, true)
-DECLARE_DCHECK_STROP_IMPL(_stricmp, false)
-#undef DECLARE_DCHECK_STROP_IMPL
-
-// Helper macro for string comparisons.
-// Don't use this macro directly in your code, use CHECK_STREQ et al below.
-#define DCHECK_STROP(func, op, expected, s1, s2) \
-  while (CheckOpString _result = \
-      logging::Check##func##expected##Impl((s1), (s2), \
-                                           #s1 " " #op " " #s2)) \
-    LOG(FATAL) << *_result.str_
-
-// String (char*) equality/inequality checks.
-// CASE versions are case-insensitive.
-//
-// Note that "s1" and "s2" may be temporary strings which are destroyed
-// by the compiler at the end of the current "full expression"
-// (e.g. DCHECK_STREQ(Foo().c_str(), Bar().c_str())).
-
-#define DCHECK_STREQ(s1, s2) DCHECK_STROP(strcmp, ==, true, s1, s2)
-#define DCHECK_STRNE(s1, s2) DCHECK_STROP(strcmp, !=, false, s1, s2)
-#define DCHECK_STRCASEEQ(s1, s2) DCHECK_STROP(_stricmp, ==, true, s1, s2)
-#define DCHECK_STRCASENE(s1, s2) DCHECK_STROP(_stricmp, !=, false, s1, s2)
-
-#define DCHECK_INDEX(I,A) DCHECK(I < (sizeof(A)/sizeof(A[0])))
-#define DCHECK_BOUND(B,A) DCHECK(B <= (sizeof(A)/sizeof(A[0])))
-
-#else  // NDEBUG
-// On a regular release build we want to be able to enable DCHECKS through the
-// command line.
-#define DLOG(severity) \
-  true ? (void) 0 : logging::LogMessageVoidify() & LOG(severity)
-
-#define DLOG_IF(severity, condition) \
-  true ? (void) 0 : logging::LogMessageVoidify() & LOG(severity)
-
-#define DLOG_ASSERT(condition) \
-  true ? (void) 0 : LOG_ASSERT(condition)
-
-enum { DEBUG_MODE = 0 };
-
-// This macro can be followed by a sequence of stream parameters in
-// non-debug mode. The DCHECK and friends macros use this so that
-// the expanded expression DCHECK(foo) << "asdf" is still syntactically
-// valid, even though the expression will get optimized away.
-#define NDEBUG_EAT_STREAM_PARAMETERS \
-  logging::LogMessage(__FILE__, __LINE__).stream()
-
-// Set to true in InitLogging when we want to enable the dchecks in release.
-extern bool g_enable_dcheck;
-#define DCHECK(condition) \
-    !logging::g_enable_dcheck ? void (0) : \
-        LOG_IF(ERROR_REPORT, !(condition)) << "Check failed: " #condition ". "
-
-// Helper macro for binary operators.
-// Don't use this macro directly in your code, use DCHECK_EQ et al below.
-#define DCHECK_OP(name, op, val1, val2)  \
-  if (logging::g_enable_dcheck) \
-    if (logging::CheckOpString _result = \
-        logging::Check##name##Impl((val1), (val2), #val1 " " #op " " #val2)) \
-      logging::LogMessage(__FILE__, __LINE__, logging::LOG_ERROR_REPORT, \
-                          _result).stream()
-
-#define DCHECK_STREQ(str1, str2) \
-  while (false) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_STRCASEEQ(str1, str2) \
-  while (false) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_STRNE(str1, str2) \
-  while (false) NDEBUG_EAT_STREAM_PARAMETERS
-
-#define DCHECK_STRCASENE(str1, str2) \
-  while (false) NDEBUG_EAT_STREAM_PARAMETERS
-
-#endif  // NDEBUG
-
-// Helper functions for DCHECK_OP macro.
-// The (int, int) specialization works around the issue that the compiler
-// will not instantiate the template version of the function on values of
-// unnamed enum type - see comment below.
-#define DEFINE_DCHECK_OP_IMPL(name, op) \
-  template <class t1, class t2> \
-  inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \
-                                        const char* names) { \
-    if (v1 op v2) return NULL; \
-    else return MakeCheckOpString(v1, v2, names); \
-  } \
-  inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \
-    if (v1 op v2) return NULL; \
-    else return MakeCheckOpString(v1, v2, names); \
-  }
-DEFINE_DCHECK_OP_IMPL(EQ, ==)
-DEFINE_DCHECK_OP_IMPL(NE, !=)
-DEFINE_DCHECK_OP_IMPL(LE, <=)
-DEFINE_DCHECK_OP_IMPL(LT, < )
-DEFINE_DCHECK_OP_IMPL(GE, >=)
-DEFINE_DCHECK_OP_IMPL(GT, > )
-#undef DEFINE_DCHECK_OP_IMPL
-
-// Equality/Inequality checks - compare two values, and log a LOG_FATAL message
-// including the two values when the result is not as expected.  The values
-// must have operator<<(ostream, ...) defined.
-//
-// You may append to the error message like so:
-//   DCHECK_NE(1, 2) << ": The world must be ending!";
-//
-// We are very careful to ensure that each argument is evaluated exactly
-// once, and that anything which is legal to pass as a function argument is
-// legal here.  In particular, the arguments may be temporary expressions
-// which will end up being destroyed at the end of the apparent statement,
-// for example:
-//   DCHECK_EQ(string("abc")[1], 'b');
-//
-// WARNING: These may not compile correctly if one of the arguments is a pointer
-// and the other is NULL. To work around this, simply static_cast NULL to the
-// type of the desired pointer.
-
-#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
-#define DCHECK_NE(val1, val2) DCHECK_OP(NE, !=, val1, val2)
-#define DCHECK_LE(val1, val2) DCHECK_OP(LE, <=, val1, val2)
-#define DCHECK_LT(val1, val2) DCHECK_OP(LT, < , val1, val2)
-#define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2)
-#define DCHECK_GT(val1, val2) DCHECK_OP(GT, > , val1, val2)
-
-#endif  // OFFICIAL_BUILD
-
-#define NOTREACHED() DCHECK(false)
-
-// Redefine the standard assert to use our nice log files
-#undef assert
-#define assert(x) DLOG_ASSERT(x)
-
-// This class more or less represents a particular log message.  You
-// create an instance of LogMessage and then stream stuff to it.
-// When you finish streaming to it, ~LogMessage is called and the
-// full message gets streamed to the appropriate destination.
-//
-// You shouldn't actually use LogMessage's constructor to log things,
-// though.  You should use the LOG() macro (and variants thereof)
-// above.
-class LogMessage {
- public:
-  LogMessage(const char* file, int line, LogSeverity severity, int ctr);
-
-  // Two special constructors that generate reduced amounts of code at
-  // LOG call sites for common cases.
-  //
-  // Used for LOG(INFO): Implied are:
-  // severity = LOG_INFO, ctr = 0
-  //
-  // Using this constructor instead of the more complex constructor above
-  // saves a couple of bytes per call site.
-  LogMessage(const char* file, int line);
-
-  // Used for LOG(severity) where severity != INFO.  Implied
-  // are: ctr = 0
-  //
-  // Using this constructor instead of the more complex constructor above
-  // saves a couple of bytes per call site.
-  LogMessage(const char* file, int line, LogSeverity severity);
-
-  // A special constructor used for check failures.
-  // Implied severity = LOG_FATAL
-  LogMessage(const char* file, int line, const CheckOpString& result);
-
-  // A special constructor used for check failures, with the option to
-  // specify severity.
-  LogMessage(const char* file, int line, LogSeverity severity,
-             const CheckOpString& result);
-
-  ~LogMessage();
-
-  std::ostream& stream() { return stream_; }
-
- private:
-  void Init(const char* file, int line);
-
-  LogSeverity severity_;
-  std::ostringstream stream_;
-  size_t message_start_;  // Offset of the start of the message (past prefix
-                          // info).
-#if defined(OS_WIN)
-  // Stores the current value of GetLastError in the constructor and restores
-  // it in the destructor by calling SetLastError.
-  // This is useful since the LogMessage class uses a lot of Win32 calls
-  // that will lose the value of GLE and the code that called the log function
-  // will have lost the thread error value when the log call returns.
-  class SaveLastError {
-   public:
-    SaveLastError();
-    ~SaveLastError();
-
-    unsigned long get_error() const { return last_error_; }
-
-   protected:
-    unsigned long last_error_;
-  };
-
-  SaveLastError last_error_;
-#endif
-
-  DISALLOW_COPY_AND_ASSIGN(LogMessage);
-};
-
-// A non-macro interface to the log facility; (useful
-// when the logging level is not a compile-time constant).
-inline void LogAtLevel(int const log_level, std::string const &msg) {
-  LogMessage(__FILE__, __LINE__, log_level).stream() << msg;
-}
-
-// This class is used to explicitly ignore values in the conditional
-// logging macros.  This avoids compiler warnings like "value computed
-// is not used" and "statement has no effect".
-class LogMessageVoidify {
- public:
-  LogMessageVoidify() { }
-  // This has to be an operator with a precedence lower than << but
-  // higher than ?:
-  void operator&(std::ostream&) { }
-};
-
-// Closes the log file explicitly if open.
-// NOTE: Since the log file is opened as necessary by the action of logging
-//       statements, there's no guarantee that it will stay closed
-//       after this call.
-void CloseLogFile();
-
-}  // namespace logging
-
-// These functions are provided as a convenience for logging, which is where we
-// use streams (it is against Google style to use streams in other places). It
-// is designed to allow you to emit non-ASCII Unicode strings to the log file,
-// which is normally ASCII. It is relatively slow, so try not to use it for
-// common cases. Non-ASCII characters will be converted to UTF-8 by these
-// operators.
-std::ostream& operator<<(std::ostream& out, const wchar_t* wstr);
-inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
-  return out << wstr.c_str();
-}
-
-// The NOTIMPLEMENTED() macro annotates codepaths which have
-// not been implemented yet.
-//
-// The implementation of this macro is controlled by NOTIMPLEMENTED_POLICY:
-//   0 -- Do nothing (stripped by compiler)
-//   1 -- Warn at compile time
-//   2 -- Fail at compile time
-//   3 -- Fail at runtime (DCHECK)
-//   4 -- [default] LOG(ERROR) at runtime
-//   5 -- LOG(ERROR) at runtime, only once per call-site
-
-#ifndef NOTIMPLEMENTED_POLICY
-// Select default policy: LOG(ERROR)
-#define NOTIMPLEMENTED_POLICY 4
-#endif
-
-#if defined(COMPILER_GCC)
-// On Linux, with GCC, we can use __PRETTY_FUNCTION__ to get the demangled name
-// of the current function in the NOTIMPLEMENTED message.
-#define NOTIMPLEMENTED_MSG "Not implemented reached in " << __PRETTY_FUNCTION__
-#else
-#define NOTIMPLEMENTED_MSG "NOT IMPLEMENTED"
-#endif
-
-#if NOTIMPLEMENTED_POLICY == 0
-#define NOTIMPLEMENTED() ;
-#elif NOTIMPLEMENTED_POLICY == 1
-// TODO, figure out how to generate a warning
-#define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED)
-#elif NOTIMPLEMENTED_POLICY == 2
-#define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED)
-#elif NOTIMPLEMENTED_POLICY == 3
-#define NOTIMPLEMENTED() NOTREACHED()
-#elif NOTIMPLEMENTED_POLICY == 4
-#define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG
-#elif NOTIMPLEMENTED_POLICY == 5
-#define NOTIMPLEMENTED() do {\
-  static int count = 0;\
-  LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\
-} while(0)
-#endif
-
-#endif // CHROMIUM_MOZILLA_BUILD
-
 #endif  // BASE_LOGGING_H_
--- a/ipc/chromium/src/base/message_loop.cc
+++ b/ipc/chromium/src/base/message_loop.cc
@@ -26,19 +26,17 @@
 #ifdef MOZ_WIDGET_QT
 #include "base/message_pump_qt.h"
 #endif
 #endif
 #ifdef MOZ_WIDGET_ANDROID
 #include "base/message_pump_android.h"
 #endif
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 #include "MessagePump.h"
-#endif
 
 using base::Time;
 using base::TimeDelta;
 
 // A lazily created thread local storage for quick access to a thread's message
 // loop, if one exists.  This should be safe and free of static constructors.
 static base::LazyInstance<base::ThreadLocalPointer<MessageLoop> > lazy_tls_ptr(
     base::LINKER_INITIALIZED);
@@ -93,27 +91,25 @@ MessageLoop::MessageLoop(Type type)
       exception_restoration_(false),
       state_(NULL),
 #ifdef OS_WIN
       os_modal_loop_(false),
 #endif  // OS_WIN
       next_sequence_num_(0) {
   DCHECK(!current()) << "should only have one message loop per thread";
   lazy_tls_ptr.Pointer()->Set(this);
-
-#ifdef CHROMIUM_MOZILLA_BUILD
   if (type_ == TYPE_MOZILLA_UI) {
     pump_ = new mozilla::ipc::MessagePump();
     return;
   }
   if (type_ == TYPE_MOZILLA_CHILD) {
     pump_ = new mozilla::ipc::MessagePumpForChildProcess();
     return;
   }
-#endif
+
 #if defined(OS_WIN)
   // TODO(rvargas): Get rid of the OS guards.
   if (type_ == TYPE_DEFAULT) {
     pump_ = new base::MessagePumpDefault();
   } else if (type_ == TYPE_IO) {
     pump_ = new base::MessagePumpForIO();
   } else {
     DCHECK(type_ == TYPE_UI);
@@ -204,25 +200,16 @@ void MessageLoop::RunHandler() {
 
   RunInternal();
 }
 
 //------------------------------------------------------------------------------
 
 void MessageLoop::RunInternal() {
   DCHECK(this == current());
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  StartHistogrammer();
-#if defined(OS_WIN)
-  if (state_->dispatcher) {
-    pump_win()->RunWithDispatcher(this, state_->dispatcher);
-    return;
-  }
-#endif
-#endif
   pump_->Run(this);
 }
 
 //------------------------------------------------------------------------------
 // Wrapper functions for use in above message loop framework.
 
 bool MessageLoop::ProcessNextDelayedNonNestableTask() {
   if (state_->run_depth != 1)
@@ -286,47 +273,34 @@ void MessageLoop::PostTask_Helper(
 
   // Warning: Don't try to short-circuit, and handle this thread's tasks more
   // directly, as it could starve handling of foreign threads.  Put every task
   // into this queue.
 
   scoped_refptr<base::MessagePump> pump;
   {
     AutoLock locked(incoming_queue_lock_);
-
-#ifdef CHROMIUM_MOZILLA_BUILD
     incoming_queue_.push(pending_task);
-#else
-    bool was_empty = incoming_queue_.empty();
-    incoming_queue_.push(pending_task);
-    if (!was_empty)
-      return;  // Someone else should have started the sub-pump.
-#endif
-
     pump = pump_;
   }
   // Since the incoming_queue_ may contain a task that destroys this message
   // loop, we cannot exit incoming_queue_lock_ until we are done with |this|.
   // We use a stack-based reference to the message pump so that we can call
   // ScheduleWork outside of incoming_queue_lock_.
 
   pump->ScheduleWork();
 }
 
 void MessageLoop::SetNestableTasksAllowed(bool allowed) {
   if (nestable_tasks_allowed_ != allowed) {
     nestable_tasks_allowed_ = allowed;
     if (!nestable_tasks_allowed_)
       return;
     // Start the native pump if we are not already pumping.
-#ifndef CHROMIUM_MOZILLA_BUILD
-    pump_->ScheduleWork();
-#else
     pump_->ScheduleWorkForNestedLoop();
-#endif
   }
 }
 
 void MessageLoop::ScheduleWork() {
   // Start the native pump if we are not already pumping.
   pump_->ScheduleWork();
 }
 
@@ -532,50 +506,24 @@ bool MessageLoop::PendingTask::operator<
   // Compare the difference to support integer roll-over.
   return (sequence_num - other.sequence_num) > 0;
 }
 
 //------------------------------------------------------------------------------
 // Method and data for histogramming events and actions taken by each instance
 // on each thread.
 
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-// static
-bool MessageLoop::enable_histogrammer_ = false;
-#endif
-
 // static
 void MessageLoop::EnableHistogrammer(bool enable) {
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  enable_histogrammer_ = enable;
-#endif
 }
 
 void MessageLoop::StartHistogrammer() {
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  if (enable_histogrammer_ && !message_histogram_.get()
-      && base::StatisticsRecorder::IsActive()) {
-    DCHECK(!thread_name_.empty());
-    message_histogram_.reset(static_cast<base::LinearHistogram*>(
-                             base::LinearHistogram::FactoryGet(("MsgLoop:" + thread_name_).c_str(),
-                                                               kLeastNonZeroMessageId,
-                                                               kMaxMessageId,
-                                                               kNumberOfDistinctMessagesDisplayed,
-                                                               base::Histogram::kNoFlags)));
-    message_histogram_->SetFlags(message_histogram_->kHexRangePrintingFlag);
-    message_histogram_->SetRangeDescriptions(event_descriptions_);
-  }
-#endif
 }
 
 void MessageLoop::HistogramEvent(int event) {
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  if (message_histogram_.get())
-    message_histogram_->Add(event);
-#endif
 }
 
 // Provide a macro that takes an expression (such as a constant, or macro
 // constant) and creates a pair to initalize an array of pairs.  In this case,
 // our pair consists of the expressions value, and the "stringized" version
 // of the expression (i.e., the exrpression put in quotes).  For example, if
 // we have:
 //    #define FOO 2
@@ -584,30 +532,16 @@ void MessageLoop::HistogramEvent(int eve
 //    VALUE_TO_NUMBER_AND_NAME(FOO + BAR)
 // will expand to:
 //   {7, "FOO + BAR"}
 // We use the resulting array as an argument to our histogram, which reads the
 // number as a bucket identifier, and proceeds to use the corresponding name
 // in the pair (i.e., the quoted string) when printing out a histogram.
 #define VALUE_TO_NUMBER_AND_NAME(name) {name, #name},
 
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-// static
-const base::LinearHistogram::DescriptionPair MessageLoop::event_descriptions_[] = {
-  // Provide some pretty print capability in our histogram for our internal
-  // messages.
-
-  // A few events we handle (kindred to messages), and used to profile actions.
-  VALUE_TO_NUMBER_AND_NAME(kTaskRunEvent)
-  VALUE_TO_NUMBER_AND_NAME(kTimerEvent)
-
-  {-1, NULL}  // The list must be null terminated, per API to histogram.
-};
-#endif
-
 //------------------------------------------------------------------------------
 // MessageLoopForUI
 
 #if defined(OS_WIN)
 
 void MessageLoopForUI::Run(Dispatcher* dispatcher) {
   AutoRunState save_state(this);
   state_->dispatcher = dispatcher;
@@ -657,19 +591,17 @@ bool MessageLoopForIO::WatchFileDescript
   return pump_libevent()->WatchFileDescriptor(
       fd,
       persistent,
       static_cast<base::MessagePumpLibevent::Mode>(mode),
       controller,
       delegate);
 }
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 bool
 MessageLoopForIO::CatchSignal(int sig,
                               SignalEvent* sigevent,
                               SignalWatcher* delegate)
 {
   return pump_libevent()->CatchSignal(sig, sigevent, delegate);
 }
-#endif  // defined(CHROMIUM_MOZILLA_BUILD)
 
 #endif
--- a/ipc/chromium/src/base/message_loop.h
+++ b/ipc/chromium/src/base/message_loop.h
@@ -5,46 +5,40 @@
 #ifndef BASE_MESSAGE_LOOP_H_
 #define BASE_MESSAGE_LOOP_H_
 
 #include <deque>
 #include <queue>
 #include <string>
 #include <vector>
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 #include <map>
 #include "base/lock.h"
-#else
-#include "base/histogram.h"
-#endif
 #include "base/message_pump.h"
 #include "base/observer_list.h"
 #include "base/ref_counted.h"
 #include "base/scoped_ptr.h"
 #include "base/task.h"
 #include "base/timer.h"
 
 #if defined(OS_WIN)
 // We need this to declare base::MessagePumpWin::Dispatcher, which we should
 // really just eliminate.
 #include "base/message_pump_win.h"
 #elif defined(OS_POSIX)
 #include "base/message_pump_libevent.h"
 #endif
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 namespace mozilla {
 namespace ipc {
 
 class DoWorkRunnable;
 
 } /* namespace ipc */
 } /* namespace mozilla */
-#endif
 
 // A MessageLoop is used to process events for a particular thread.  There is
 // at most one MessageLoop instance per thread.
 //
 // Events include at a minimum Task instances submitted to PostTask or those
 // managed by TimerManager.  Depending on the type of message pump used by the
 // MessageLoop other events such as UI messages may be processed.  On Windows
 // APC calls (as time permits) and signals sent to a registered set of HANDLEs
@@ -68,19 +62,17 @@ class DoWorkRunnable;
 //   MessageLoop::current()->SetNestableTasksAllowed(old_state);
 //   // Process hr  (the result returned by DoDragDrop().
 //
 // Please be SURE your task is reentrant (nestable) and all global variables
 // are stable and accessible before calling SetNestableTasksAllowed(true).
 //
 class MessageLoop : public base::MessagePump::Delegate {
 
-#ifdef CHROMIUM_MOZILLA_BUILD
   friend class mozilla::ipc::DoWorkRunnable;
-#endif
 
 public:
   static void EnableHistogrammer(bool enable_histogrammer);
 
   // A DestructionObserver is notified when the current MessageLoop is being
   // destroyed.  These obsevers are notified prior to MessageLoop::current()
   // being changed to return NULL.  This gives interested parties the chance to
   // do final cleanup that depends on the MessageLoop.
@@ -207,21 +199,19 @@ public:
   //
   // TYPE_MOZILLA_UI
   //   This type of ML is used in Mozilla parent processes which initialize
   //   XPCOM and use the gecko event loop.
   //
   enum Type {
     TYPE_DEFAULT,
     TYPE_UI,
-    TYPE_IO
-#ifdef CHROMIUM_MOZILLA_BUILD
-    , TYPE_MOZILLA_CHILD
-    , TYPE_MOZILLA_UI
-#endif
+    TYPE_IO,
+    TYPE_MOZILLA_CHILD,
+    TYPE_MOZILLA_UI
   };
 
   // Normally, it is not necessary to instantiate a MessageLoop.  Instead, it
   // is typical to make use of the current thread's MessageLoop instance.
   explicit MessageLoop(Type type = TYPE_DEFAULT);
   ~MessageLoop();
 
   // Returns the type passed to the constructor.
@@ -385,21 +375,16 @@ public:
   // and IF the statistics recorder can accept a registration of our histogram.
   void StartHistogrammer();
 
   // Add occurence of event to our histogram, so that we can see what is being
   // done in a specific MessageLoop instance (i.e., specific thread).
   // If message_histogram_ is NULL, this is a no-op.
   void HistogramEvent(int event);
 
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  static const base::LinearHistogram::DescriptionPair event_descriptions_[];
-  static bool enable_histogrammer_;
-#endif
-
   Type type_;
 
   // A list of tasks that need to be processed by this instance.  Note that
   // this queue is only accessed (push/pop) by our current thread.
   TaskQueue work_queue_;
 
   // Contains delayed tasks, sorted by their 'delayed_run_time' property.
   DelayedTaskQueue delayed_work_queue_;
@@ -415,20 +400,17 @@ public:
 
   // A recursion block that prevents accidentally running additonal tasks when
   // insider a (accidentally induced?) nested message pump.
   bool nestable_tasks_allowed_;
 
   bool exception_restoration_;
 
   std::string thread_name_;
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  // A profiling histogram showing the counts of various messages and events.
-  scoped_ptr<base::LinearHistogram> message_histogram_;
-#endif
+
   // A null terminated list which creates an incoming_queue of tasks that are
   // aquired under a mutex for processing on this instance's thread. These tasks
   // have not yet been sorted out into items for our work_queue_ vs items that
   // will be handled by the TimerManager.
   TaskQueue incoming_queue_;
   // Protect access to incoming_queue_.
   Lock incoming_queue_lock_;
 
@@ -458,24 +440,20 @@ class MessageLoopForUI : public MessageL
   MessageLoopForUI(Type type=TYPE_UI) : MessageLoop(type) {
   }
 
   // Returns the MessageLoopForUI of the current thread.
   static MessageLoopForUI* current() {
     MessageLoop* loop = MessageLoop::current();
     if (!loop)
       return NULL;
-#ifdef CHROMIUM_MOZILLA_BUILD
     Type type = loop->type();
     DCHECK(type == MessageLoop::TYPE_UI ||
            type == MessageLoop::TYPE_MOZILLA_UI ||
            type == MessageLoop::TYPE_MOZILLA_CHILD);
-#else
-    DCHECK_EQ(MessageLoop::TYPE_UI, loop->type());
-#endif
     return static_cast<MessageLoopForUI*>(loop);
   }
 
 #if defined(OS_WIN)
   typedef base::MessagePumpWin::Dispatcher Dispatcher;
   typedef base::MessagePumpWin::Observer Observer;
 
   // Please see MessagePumpWin for definitions of these methods.
@@ -546,23 +524,21 @@ class MessageLoopForIO : public MessageL
 
   // Please see MessagePumpLibevent for definition.
   bool WatchFileDescriptor(int fd,
                            bool persistent,
                            Mode mode,
                            FileDescriptorWatcher *controller,
                            Watcher *delegate);
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   typedef base::MessagePumpLibevent::SignalEvent SignalEvent;
   typedef base::MessagePumpLibevent::SignalWatcher SignalWatcher;
   bool CatchSignal(int sig,
                    SignalEvent* sigevent,
                    SignalWatcher* delegate);
-#endif  // defined(CHROMIUM_MOZILLA_BUILD)
 
 #endif  // defined(OS_POSIX)
 };
 
 // Do not add any member variables to MessageLoopForIO!  This is important b/c
 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO).  Any extra
 // data that you need should be stored on the MessageLoop's pump_ instance.
 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
--- a/ipc/chromium/src/base/message_pump.h
+++ b/ipc/chromium/src/base/message_pump.h
@@ -106,25 +106,23 @@ class MessagePump : public RefCountedThr
   virtual void Quit() = 0;
 
   // Schedule a DoWork callback to happen reasonably soon.  Does nothing if a
   // DoWork callback is already scheduled.  This method may be called from any
   // thread.  Once this call is made, DoWork should not be "starved" at least
   // until it returns a value of false.
   virtual void ScheduleWork() = 0;
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   // This method may only called from the thread that called Run.
   //
   // Ensure that DoWork will be called if a nested loop is entered.
   // If a MessagePump can already guarantee that DoWork will be called
   // "reasonably soon", this method can be a no-op to avoid expensive
   // atomic tests and/or syscalls required for ScheduleWork().
   virtual void ScheduleWorkForNestedLoop() { ScheduleWork(); };
-#endif  // defined(CHROMIUM_MOZILLA_BUILD)
 
   // Schedule a DoDelayedWork callback to happen at the specified time,
   // cancelling any pending DoDelayedWork callback.  This method may only be
   // used on the thread that called Run.
   virtual void ScheduleDelayedWork(const Time& delayed_work_time) = 0;
 };
 
 }  // namespace base
--- a/ipc/chromium/src/base/message_pump_default.h
+++ b/ipc/chromium/src/base/message_pump_default.h
@@ -17,31 +17,25 @@ class MessagePumpDefault : public Messag
   ~MessagePumpDefault() {}
 
   // MessagePump methods:
   virtual void Run(Delegate* delegate);
   virtual void Quit();
   virtual void ScheduleWork();
   virtual void ScheduleDelayedWork(const Time& delayed_work_time);
 
-#ifdef CHROMIUM_MOZILLA_BUILD
  protected:
-#else
- private:
-#endif
   // This flag is set to false when Run should return.
   bool keep_running_;
 
   // Used to sleep until there is more work to do.
   WaitableEvent event_;
 
   // The time at which we should call DoDelayedWork.
   Time delayed_work_time_;
 
-#ifdef CHROMIUM_MOZILLA_BUILD
  private:
-#endif
   DISALLOW_COPY_AND_ASSIGN(MessagePumpDefault);
 };
 
 }  // namespace base
 
 #endif  // BASE_MESSAGE_PUMP_DEFAULT_H_
--- a/ipc/chromium/src/base/message_pump_libevent.cc
+++ b/ipc/chromium/src/base/message_pump_libevent.cc
@@ -207,17 +207,16 @@ void MessagePumpLibevent::OnLibeventNoti
     watcher->OnFileCanWriteWithoutBlocking(fd);
   }
   if (flags & EV_READ) {
     watcher->OnFileCanReadWithoutBlocking(fd);
   }
 }
 
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 MessagePumpLibevent::SignalEvent::SignalEvent() :
   event_(NULL)
 {
 }
 
 MessagePumpLibevent::SignalEvent::~SignalEvent()
 {
   if (event_) {
@@ -288,17 +287,16 @@ void
 MessagePumpLibevent::OnLibeventSignalNotification(int sig, short flags,
                                                   void* context)
 {
   DCHECK(sig > 0);
   DCHECK(EV_SIGNAL == flags);
   DCHECK(context);
   reinterpret_cast<SignalWatcher*>(context)->OnSignal(sig);
 }
-#endif  // defined(CHROMIUM_MOZILLA_BUILD)
 
 
 // Reentrant!
 void MessagePumpLibevent::Run(Delegate* delegate) {
   DCHECK(keep_running_) << "Quit must have been called outside of Run!";
 
   bool old_in_run = in_run_;
   in_run_ = true;
--- a/ipc/chromium/src/base/message_pump_libevent.h
+++ b/ipc/chromium/src/base/message_pump_libevent.h
@@ -80,17 +80,16 @@ class MessagePumpLibevent : public Messa
   // TODO(dkegel): switch to edge-triggered readiness notification
   bool WatchFileDescriptor(int fd,
                            bool persistent,
                            Mode mode,
                            FileDescriptorWatcher *controller,
                            Watcher *delegate);
 
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   // This is analagous to FileDescriptorWatcher above, which really is
   // just a wrapper around libevent's |struct event|.  This class acts
   // as a sort of "scoped event watcher" in that it guarantees that
   // when this class is out of scope, the signal-event it wraps is
   // removed from libevent's guts.
   //
   // XXX/cjones: this isn't my favorite API, but preserving it in
   // order to match code above
@@ -124,17 +123,16 @@ class MessagePumpLibevent : public Messa
   // Have the current thread's message loop catch the signal |sig|.
   // Multiple watchers can catch the same signal; they're all notified
   // upon its delivery.  Callers must provide a preallocated
   // SignalEvent object which can be used to manage the lifetime of
   // this event.  Returns true on success.
   bool CatchSignal(int sig,
                    SignalEvent* sigevent,
                    SignalWatcher* delegate);
-#endif  // defined(CHROMIUM_MOZILLA_BUILD)
 
 
   // MessagePump methods:
   virtual void Run(Delegate* delegate);
   virtual void Quit();
   virtual void ScheduleWork();
   virtual void ScheduleDelayedWork(const Time& delayed_work_time);
 
@@ -155,21 +153,19 @@ class MessagePumpLibevent : public Messa
   // Libevent dispatcher.  Watches all sockets registered with it, and sends
   // readiness callbacks when a socket is ready for I/O.
   event_base* event_base_;
 
   // Called by libevent to tell us a registered FD can be read/written to.
   static void OnLibeventNotification(int fd, short flags,
                                      void* context);
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   // Called by libevent upon receiving a signal
   static void OnLibeventSignalNotification(int sig, short flags,
                                            void* context);
-#endif
 
   // Unix pipe used to implement ScheduleWork()
   // ... callback; called by libevent inside Run() when pipe is ready to read
   static void OnWakeup(int socket, short flags, void* context);
   // ... write end; ScheduleWork() writes a single byte to it
   int wakeup_pipe_in_;
   // ... read end; OnWakeup reads it and then breaks Run() out of its sleep
   int wakeup_pipe_out_;
--- a/ipc/chromium/src/base/pickle.cc
+++ b/ipc/chromium/src/base/pickle.cc
@@ -10,21 +10,17 @@
 #include <string>
 
 //------------------------------------------------------------------------------
 
 // static
 const int Pickle::kPayloadUnit = 64;
 
 // We mark a read only pickle with a special capacity_.
-#ifdef CHROMIUM_MOZILLA_BUILD
 static const uint32 kCapacityReadOnly = (uint32) -1;
-#else
-static const size_t kCapacityReadOnly = (size_t) -1;
-#endif
 
 // Payload is uint32 aligned.
 
 Pickle::Pickle()
     : header_(NULL),
       header_size_(sizeof(Header)),
       capacity_(0),
       variable_buffer_offset_(0) {
@@ -32,21 +28,17 @@ Pickle::Pickle()
   header_->payload_size = 0;
 }
 
 Pickle::Pickle(int header_size)
     : header_(NULL),
       header_size_(AlignInt(header_size, sizeof(uint32))),
       capacity_(0),
       variable_buffer_offset_(0) {
-#ifdef CHROMIUM_MOZILLA_BUILD
   DCHECK(static_cast<uint32>(header_size) >= sizeof(Header));
-#else
-  DCHECK(static_cast<size_t>(header_size) >= sizeof(Header));
-#endif
   DCHECK(header_size <= kPayloadUnit);
   Resize(kPayloadUnit);
   header_->payload_size = 0;
 }
 
 Pickle::Pickle(const char* data, int data_len)
     : header_(reinterpret_cast<Header*>(const_cast<char*>(data))),
       header_size_(data_len - header_->payload_size),
@@ -56,21 +48,17 @@ Pickle::Pickle(const char* data, int dat
   DCHECK(header_size_ == AlignInt(header_size_, sizeof(uint32)));
 }
 
 Pickle::Pickle(const Pickle& other)
     : header_(NULL),
       header_size_(other.header_size_),
       capacity_(0),
       variable_buffer_offset_(other.variable_buffer_offset_) {
-#ifdef CHROMIUM_MOZILLA_BUILD
   uint32 payload_size = header_size_ + other.header_->payload_size;
-#else
-  size_t payload_size = header_size_ + other.header_->payload_size;
-#endif
   bool resized = Resize(payload_size);
   CHECK(resized);  // Realloc failed.
   memcpy(header_, other.header_, payload_size);
 }
 
 Pickle::~Pickle() {
   if (capacity_ != kCapacityReadOnly)
     free(header_);
@@ -394,31 +382,22 @@ bool Pickle::ReadData(void** iter, const
     *iter = const_cast<char*>(payload());
 
   if (!ReadLength(iter, length))
     return false;
 
   return ReadBytes(iter, data, *length);
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 char* Pickle::BeginWrite(uint32 length) {
-#else
-char* Pickle::BeginWrite(size_t length) {
-#endif
   // write at a uint32-aligned offset from the beginning of the header
   uint32 offset = AlignInt(header_->payload_size, sizeof(uint32));
-
-#ifdef CHROMIUM_MOZILLA_BUILD
   uint32 new_size = offset + AlignInt(length, sizeof(uint32));
   uint32 needed_size = header_size_ + new_size;
-#else
-  size_t new_size = offset + length;
-  size_t needed_size = header_size_ + new_size;
-#endif
+
   if (needed_size > capacity_ && !Resize(std::max(capacity_ * 2, needed_size)))
     return NULL;
 
 #ifdef ARCH_CPU_64_BITS
   DCHECK_LE(length, std::numeric_limits<uint32>::max());
 #endif
 
   header_->payload_size = static_cast<uint32>(new_size);
@@ -504,46 +483,34 @@ void Pickle::TrimWriteData(int new_lengt
     return;
   }
 
   // Update the payload size and variable buffer size
   header_->payload_size -= (*cur_length - new_length);
   *cur_length = new_length;
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 bool Pickle::Resize(uint32 new_capacity) {
-#else
-bool Pickle::Resize(size_t new_capacity) {
-#endif
   new_capacity = AlignInt(new_capacity, kPayloadUnit);
 
   void* p = realloc(header_, new_capacity);
   if (!p)
     return false;
 
   header_ = reinterpret_cast<Header*>(p);
   capacity_ = new_capacity;
   return true;
 }
 
 // static
-#ifdef CHROMIUM_MOZILLA_BUILD
 const char* Pickle::FindNext(uint32 header_size,
-#else
-const char* Pickle::FindNext(size_t header_size,
-#endif
                              const char* start,
                              const char* end) {
   DCHECK(header_size == AlignInt(header_size, sizeof(uint32)));
-#ifdef CHROMIUM_MOZILLA_BUILD
   DCHECK(header_size <= static_cast<uint32>(kPayloadUnit));
-#else
-  DCHECK(header_size <= static_cast<size_t>(kPayloadUnit));
-#endif
 
   const Header* hdr = reinterpret_cast<const Header*>(start);
   const char* payload_base = start + header_size;
   const char* payload_end = payload_base + hdr->payload_size;
   if (payload_end < payload_base)
     return NULL;
 
   return (payload_end > end) ? NULL : payload_end;
--- a/ipc/chromium/src/base/pickle.h
+++ b/ipc/chromium/src/base/pickle.h
@@ -165,21 +165,19 @@ class Pickle {
   // requested.  For example, you may have created a buffer with 10K of data,
   // but decided to only fill 10 bytes of that data.  Use this function
   // to trim the buffer so that we don't send 9990 bytes of unused data.
   // You cannot increase the size of the variable buffer; only shrink it.
   // This function assumes that the length of the variable buffer has
   // not been changed.
   void TrimWriteData(int length);
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   void EndRead(void* iter) const {
     DCHECK(iter == end_of_payload());
   }
-#endif
 
   // Payload follows after allocation of Header (header size is customizable).
   struct Header {
     uint32 payload_size;  // Specifies the size of the payload.
   };
 
   // Returns the header, cast to a user-specified type T.  The type T must be a
   // subclass of Header and its size must correspond to the header_size passed
@@ -202,21 +200,17 @@ class Pickle {
     if ((len < 0) || (iter < header_) || iter > end_of_payload())
       return false;
     const char* end_of_region = reinterpret_cast<const char*>(iter) + len;
     // Watch out for overflow in pointer calculation, which wraps.
     return (iter <= end_of_region) && (end_of_region <= end_of_payload());
   }
 
  protected:
-#ifdef CHROMIUM_MOZILLA_BUILD
   uint32 payload_size() const { return header_->payload_size; }
-#else
-  size_t payload_size() const { return header_->payload_size; }
-#endif
 
   char* payload() {
     return reinterpret_cast<char*>(header_) + header_size_;
   }
   const char* payload() const {
     return reinterpret_cast<const char*>(header_) + header_size_;
   }
 
@@ -224,89 +218,61 @@ class Pickle {
   // header + payload.
   char* end_of_payload() {
     return payload() + payload_size();
   }
   const char* end_of_payload() const {
     return payload() + payload_size();
   }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
   uint32 capacity() const {
-#else
-  size_t capacity() const {
-#endif
     return capacity_;
   }
 
   // Resizes the buffer for use when writing the specified amount of data. The
   // location that the data should be written at is returned, or NULL if there
   // was an error. Call EndWrite with the returned offset and the given length
   // to pad out for the next write.
-#ifdef CHROMIUM_MOZILLA_BUILD
   char* BeginWrite(uint32 length);
-#else
-  char* BeginWrite(size_t length);
-#endif
 
   // Completes the write operation by padding the data with NULL bytes until it
   // is padded. Should be paired with BeginWrite, but it does not necessarily
   // have to be called after the data is written.
   void EndWrite(char* dest, int length);
 
   // Resize the capacity, note that the input value should include the size of
   // the header: new_capacity = sizeof(Header) + desired_payload_capacity.
   // A realloc() failure will cause a Resize failure... and caller should check
   // the return result for true (i.e., successful resizing).
-#ifdef CHROMIUM_MOZILLA_BUILD
   bool Resize(uint32 new_capacity);
-#else
-  bool Resize(size_t new_capacity);
-#endif
 
   // Aligns 'i' by rounding it up to the next multiple of 'alignment'
-#ifdef CHROMIUM_MOZILLA_BUILD
   static uint32 AlignInt(uint32 i, int alignment) {
-#else
-  static size_t AlignInt(size_t i, int alignment) {
-#endif
     return i + (alignment - (i % alignment)) % alignment;
   }
 
   // Moves the iterator by the given number of bytes, making sure it is aligned.
   // Pointer (iterator) is NOT aligned, but the change in the pointer
   // is guaranteed to be a multiple of sizeof(uint32).
   static void UpdateIter(void** iter, int bytes) {
     *iter = static_cast<char*>(*iter) + AlignInt(bytes, sizeof(uint32));
   }
 
   // Find the end of the pickled data that starts at range_start.  Returns NULL
   // if the entire Pickle is not found in the given data range.
-#ifdef CHROMIUM_MOZILLA_BUILD
   static const char* FindNext(uint32 header_size,
-#else
-  static const char* FindNext(size_t header_size,
-#endif
                               const char* range_start,
                               const char* range_end);
 
   // The allocation granularity of the payload.
   static const int kPayloadUnit;
 
  private:
   Header* header_;
-#ifdef CHROMIUM_MOZILLA_BUILD
   uint32 header_size_;
   uint32 capacity_;
   uint32 variable_buffer_offset_;
-#else
-  size_t header_size_;  // Supports extra data between header and payload.
-  // Allocation size of payload (or -1 if allocation is const).
-  size_t capacity_;
-  size_t variable_buffer_offset_;  // IF non-zero, then offset to a buffer.
-#endif
-
   FRIEND_TEST(PickleTest, Resize);
   FRIEND_TEST(PickleTest, FindNext);
   FRIEND_TEST(PickleTest, IteratorHasRoom);
 };
 
 #endif  // BASE_PICKLE_H__
--- a/ipc/chromium/src/base/port.h
+++ b/ipc/chromium/src/base/port.h
@@ -35,38 +35,27 @@
 namespace base {
 
 // It's possible for functions that use a va_list, such as StringPrintf, to
 // invalidate the data in it upon use.  The fix is to make a copy of the
 // structure before using it and use that copy instead.  va_copy is provided
 // for this purpose.  MSVC does not provide va_copy, so define an
 // implementation here.  It is not guaranteed that assignment is a copy, so the
 // StringUtil.VariableArgsFunc unit test tests this capability.
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-inline void va_copy(va_list& a, va_list& b) {
-#if defined(COMPILER_GCC)
-  ::va_copy(a, b);
-#elif defined(COMPILER_MSVC)
-  a = b;
-#endif
-}
 
-#else
 // The C standard says that va_copy is a "macro", not a function.  Trying to 
 // use va_list as ref args to a function, as above, breaks some machines.
 #  if defined(COMPILER_GCC)
 #    define base_va_copy(_a, _b) ::va_copy(_a, _b)
 #  elif defined(COMPILER_MSVC)
 #    define base_va_copy(_a, _b) (_a = _b)
 #  else
 #    error No va_copy for your compiler
 #  endif
 
-#endif
-
 }  // namespace base
 
 // Define an OS-neutral wrapper for shared library entry points
 #if defined(OS_WIN)
 #define API_CALL __stdcall
 #elif defined(OS_LINUX) || defined(OS_MACOSX)
 #define API_CALL
 #endif
--- a/ipc/chromium/src/base/process_util_linux.cc
+++ b/ipc/chromium/src/base/process_util_linux.cc
@@ -27,30 +27,26 @@ enum ParsingState {
 };
 
 static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG");
 
 }  // namespace
 
 namespace base {
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 bool LaunchApp(const std::vector<std::string>& argv,
                const file_handle_mapping_vector& fds_to_remap,
                bool wait, ProcessHandle* process_handle) {
   return LaunchApp(argv, fds_to_remap, environment_map(),
                    wait, process_handle);
 }
-#endif
 
 bool LaunchApp(const std::vector<std::string>& argv,
                const file_handle_mapping_vector& fds_to_remap,
-#if defined(CHROMIUM_MOZILLA_BUILD)
                const environment_map& env_vars_to_set,
-#endif
                bool wait, ProcessHandle* process_handle,
                ProcessArchitecture arch) {
   pid_t pid = fork();
   if (pid < 0)
     return false;
 
   if (pid == 0) {
     InjectiveMultimap fd_shuffle;
@@ -59,33 +55,29 @@ bool LaunchApp(const std::vector<std::st
       fd_shuffle.push_back(InjectionArc(it->first, it->second, false));
     }
 
     if (!ShuffleFileDescriptors(fd_shuffle))
       exit(127);
 
     CloseSuperfluousFds(fd_shuffle);
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
     for (environment_map::const_iterator it = env_vars_to_set.begin();
          it != env_vars_to_set.end(); ++it) {
       if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
         exit(127);
     }
-#endif
 
     scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
     for (size_t i = 0; i < argv.size(); i++)
       argv_cstr[i] = const_cast<char*>(argv[i].c_str());
     argv_cstr[argv.size()] = NULL;
     execvp(argv_cstr[0], argv_cstr.get());
-#if defined(CHROMIUM_MOZILLA_BUILD)
     // if we get here, we're in serious trouble and should complain loudly
     DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
-#endif
     exit(127);
   } else {
     gProcessLog.print("==> process %d launched child process %d\n",
                       GetCurrentProcId(), pid);
     if (wait)
       HANDLE_EINTR(waitpid(pid, 0, 0));
 
     if (process_handle)
--- a/ipc/chromium/src/base/process_util_win.cc
+++ b/ipc/chromium/src/base/process_util_win.cc
@@ -316,46 +316,16 @@ bool DidProcessCrash(bool* child_exited,
       exitcode == PROCESS_END_KILLED_BY_USER ||
       exitcode == PROCESS_END_PROCESS_WAS_HUNG ||
       exitcode == 0xC0000354 ||     // STATUS_DEBUGGER_INACTIVE.
       exitcode == 0xC000013A ||     // Control-C/end session.
       exitcode == 0x40010004) {     // Debugger terminated process/end session.
     return false;
   }
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-  // All other exit codes indicate crashes.
-
-  // TODO(jar): Remove histogramming code when UMA stats are consistent with
-  // other crash metrics.
-  // Histogram the low order 3 nibbles for UMA
-  const int kLeastValue = 0;
-  const int kMaxValue = 0xFFF;
-  const int kBucketCount = kMaxValue - kLeastValue + 1;
-  static LinearHistogram least_significant_histogram("ExitCodes.LSNibbles",
-      kLeastValue + 1, kMaxValue, kBucketCount);
-  least_significant_histogram.SetFlags(kUmaTargetedHistogramFlag |
-                                       LinearHistogram::kHexRangePrintingFlag);
-  least_significant_histogram.Add(exitcode & 0xFFF);
-
-  // Histogram the high order 3 nibbles
-  static LinearHistogram most_significant_histogram("ExitCodes.MSNibbles",
-      kLeastValue + 1, kMaxValue, kBucketCount);
-  most_significant_histogram.SetFlags(kUmaTargetedHistogramFlag |
-                                      LinearHistogram::kHexRangePrintingFlag);
-  // Avoid passing in negative numbers by shifting data into low end of dword.
-  most_significant_histogram.Add((exitcode >> 20) & 0xFFF);
-
-  // Histogram the middle order 2 nibbles
-  static LinearHistogram mid_significant_histogram("ExitCodes.MidNibbles",
-      1, 0xFF, 0x100);
-  mid_significant_histogram.SetFlags(kUmaTargetedHistogramFlag |
-                                      LinearHistogram::kHexRangePrintingFlag);
-  mid_significant_histogram.Add((exitcode >> 12) & 0xFF);
-#endif
   return true;
 }
 
 bool WaitForExitCode(ProcessHandle handle, int* exit_code) {
   ScopedHandle closer(handle);  // Ensure that we always close the handle.
   if (::WaitForSingleObject(handle, INFINITE) != WAIT_OBJECT_0) {
     NOTREACHED();
     return false;
--- a/ipc/chromium/src/base/shared_memory.h
+++ b/ipc/chromium/src/base/shared_memory.h
@@ -62,21 +62,17 @@ class SharedMemory {
   static SharedMemoryHandle NULLHandle();
 
   // Creates or opens a shared memory segment based on a name.
   // If read_only is true, opens the memory as read-only.
   // If open_existing is true, and the shared memory already exists,
   // opens the existing shared memory and ignores the size parameter.
   // If name is the empty string, use a unique name.
   // Returns true on success, false on failure.
-#ifdef CHROMIUM_MOZILLA_BUILD
   bool Create(const std::string& name, bool read_only, bool open_existing,
-#else
-  bool Create(const std::wstring& name, bool read_only, bool open_existing,
-#endif
               size_t size);
 
   // Deletes resources associated with a shared memory segment based on name.
   // Not all platforms require this call.
   bool Delete(const std::wstring& name);
 
   // Opens a shared memory segment based on a name.
   // If read_only is true, opens for read-only access.
--- a/ipc/chromium/src/base/shared_memory_posix.cc
+++ b/ipc/chromium/src/base/shared_memory_posix.cc
@@ -65,27 +65,21 @@ bool SharedMemory::IsHandleValid(const S
   return handle.fd >= 0;
 }
 
 // static
 SharedMemoryHandle SharedMemory::NULLHandle() {
   return SharedMemoryHandle();
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 bool SharedMemory::Create(const std::string &cname, bool read_only,
-#else
-bool SharedMemory::Create(const std::wstring &name, bool read_only,
-#endif
                           bool open_existing, size_t size) {
   read_only_ = read_only;
 
-#ifdef CHROMIUM_MOZILLA_BUILD
   std::wstring name = UTF8ToWide(cname);
-#endif
 
   int posix_flags = 0;
   posix_flags |= read_only ? O_RDONLY : O_RDWR;
   if (!open_existing || mapped_file_ <= 0)
     posix_flags |= O_CREAT;
 
   if (!CreateOrOpen(name, posix_flags, size))
     return false;
--- a/ipc/chromium/src/base/shared_memory_win.cc
+++ b/ipc/chromium/src/base/shared_memory_win.cc
@@ -1,19 +1,17 @@
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "base/shared_memory.h"
 
 #include "base/logging.h"
 #include "base/win_util.h"
-#ifdef CHROMIUM_MOZILLA_BUILD
-#  include "base/string_util.h"
-#endif
+#include "base/string_util.h"
 
 namespace base {
 
 SharedMemory::SharedMemory()
     : mapped_file_(NULL),
       memory_(NULL),
       read_only_(false),
       max_size_(0),
@@ -53,28 +51,20 @@ bool SharedMemory::IsHandleValid(const S
   return handle != NULL;
 }
 
 // static
 SharedMemoryHandle SharedMemory::NULLHandle() {
   return NULL;
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 bool SharedMemory::Create(const std::string &cname, bool read_only,
-#else
-bool SharedMemory::Create(const std::wstring &name, bool read_only,
-#endif
                           bool open_existing, size_t size) {
   DCHECK(mapped_file_ == NULL);
-
-#ifdef CHROMIUM_MOZILLA_BUILD
   std::wstring name = UTF8ToWide(cname);
-#endif
-
   name_ = name;
   read_only_ = read_only;
   mapped_file_ = CreateFileMapping(INVALID_HANDLE_VALUE, NULL,
       read_only_ ? PAGE_READONLY : PAGE_READWRITE, 0, static_cast<DWORD>(size),
       name.empty() ? NULL : name.c_str());
   if (!mapped_file_)
     return false;
 
--- a/ipc/chromium/src/base/stats_table.cc
+++ b/ipc/chromium/src/base/stats_table.cc
@@ -165,22 +165,17 @@ class StatsTablePrivate {
 };
 
 // static
 StatsTablePrivate* StatsTablePrivate::New(const std::string& name,
                                           int size,
                                           int max_threads,
                                           int max_counters) {
   scoped_ptr<StatsTablePrivate> priv(new StatsTablePrivate());
-#ifdef CHROMIUM_MOZILLA_BUILD
-  if (!priv->shared_memory_.Create(name, false, true,
-#else
-  if (!priv->shared_memory_.Create(base::SysUTF8ToWide(name), false, true,
-#endif
-                                   size))
+  if (!priv->shared_memory_.Create(name, false, true, size))
     return NULL;
   if (!priv->shared_memory_.Map(size))
     return NULL;
   void* memory = priv->shared_memory_.memory();
 
   TableHeader* header = static_cast<TableHeader*>(memory);
 
   // If the version does not match, then assume the table needs
--- a/ipc/chromium/src/base/string16.cc
+++ b/ipc/chromium/src/base/string16.cc
@@ -64,15 +64,9 @@ char16* c16memset(char16* s, char16 c, s
   }
   return s_orig;
 }
 
 }  // namespace base
 
 template class std::basic_string<char16, base::string16_char_traits>;
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-std::ostream& operator<<(std::ostream& out, const string16& str) {
-  return out << UTF16ToUTF8(str);
-}
-#endif
-
 #endif  // WCHAR_T_IS_UTF32
--- a/ipc/chromium/src/base/string_util.cc
+++ b/ipc/chromium/src/base/string_util.cc
@@ -18,19 +18,16 @@
 #include <wctype.h>
 
 #include <algorithm>
 #include <vector>
 
 #include "base/basictypes.h"
 #include "base/logging.h"
 #include "base/singleton.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "base/third_party/dmg_fp/dmg_fp.h"
-#endif
 
 namespace {
 
 // Force the singleton used by Empty[W]String[16] to be a unique type. This
 // prevents other code that might accidentally use Singleton<string> from
 // getting our internal one.
 struct EmptyStrings {
   EmptyStrings() {}
@@ -244,57 +241,16 @@ class HexString16ToLongTraits {
     return ret;
 #endif
   }
   static inline bool valid_func(const string_type& str) {
     return !str.empty() && !iswspace(str[0]);
   }
 };
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-class StringToDoubleTraits {
- public:
-  typedef std::string string_type;
-  typedef double value_type;
-  static inline value_type convert_func(const string_type::value_type* str,
-                                        string_type::value_type** endptr) {
-    return dmg_fp::strtod(str, endptr);
-  }
-  static inline bool valid_func(const string_type& str) {
-    return !str.empty() && !isspace(str[0]);
-  }
-};
-
-class String16ToDoubleTraits {
- public:
-  typedef string16 string_type;
-  typedef double value_type;
-  static inline value_type convert_func(const string_type::value_type* str,
-                                        string_type::value_type** endptr) {
-    // Because dmg_fp::strtod does not like char16, we convert it to ASCII.
-    // In theory, this should be safe, but it's possible that 16-bit chars
-    // might get ignored by accident causing something to be parsed when it
-    // shouldn't.
-    std::string ascii_string = UTF16ToASCII(string16(str));
-    char* ascii_end = NULL;
-    value_type ret = dmg_fp::strtod(ascii_string.c_str(), &ascii_end);
-    if (ascii_string.c_str() + ascii_string.length() == ascii_end) {
-      // Put endptr at end of input string, so it's not recognized as an error.
-      *endptr =
-          const_cast<string_type::value_type*>(str) + ascii_string.length();
-    }
-
-    return ret;
-  }
-  static inline bool valid_func(const string_type& str) {
-    return !str.empty() && !iswspace(str[0]);
-  }
-};
-#endif
-
 }  // namespace
 
 
 namespace base {
 
 bool IsWprintfFormatPortable(const wchar_t* format) {
   for (const wchar_t* position = format; *position != '\0'; ++position) {
 
@@ -330,35 +286,31 @@ bool IsWprintfFormatPortable(const wchar
   }
 
   return true;
 }
 
 
 }  // namespace base
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 namespace base {
-#endif
 
 const std::string& EmptyString() {
   return Singleton<EmptyStrings>::get()->s;
 }
 
 const std::wstring& EmptyWString() {
   return Singleton<EmptyStrings>::get()->ws;
 }
 
 const string16& EmptyString16() {
   return Singleton<EmptyStrings>::get()->s16;
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 }
-#endif
 
 const wchar_t kWhitespaceWide[] = {
   0x0009,  // <control-0009> to <control-000D>
   0x000A,
   0x000B,
   0x000C,
   0x000D,
   0x0020,  // Space
@@ -760,21 +712,17 @@ bool StartsWith(const std::wstring& str,
                 const std::wstring& search,
                 bool case_sensitive) {
   if (case_sensitive)
     return str.compare(0, search.length(), search) == 0;
   else {
     if (search.size() > str.size())
       return false;
     return std::equal(search.begin(), search.end(), str.begin(),
-#if defined(CHROMIUM_MOZILLA_BUILD)
                       chromium_CaseInsensitiveCompare<wchar_t>());
-#else
-                      CaseInsensitiveCompare<wchar_t>());
-#endif
   }
 }
 
 DataUnits GetByteDisplayUnits(int64 bytes) {
   // The byte thresholds at which we display amounts.  A byte count is displayed
   // in unit U when kUnitThresholds[U] <= bytes < kUnitThresholds[U+1].
   // This must match the DataUnits enum.
   static const int64 kUnitThresholds[] = {
@@ -939,21 +887,17 @@ static void StringAppendVT(StringType* d
                            const typename StringType::value_type* format,
                            va_list ap) {
   // First try with a small fixed size buffer.
   // This buffer size should be kept in sync with StringUtilTest.GrowBoundary
   // and StringUtilTest.StringPrintfBounds.
   typename StringType::value_type stack_buf[1024];
 
   va_list backup_ap;
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  base::va_copy(backup_ap, ap);
-#else
   base_va_copy(backup_ap, ap);
-#endif	// !defined(CHROMIUM_MOZILLA_BUILD)
 
 #if !defined(OS_WIN)
   errno = 0;
 #endif
   int result = vsnprintfT(stack_buf, arraysize(stack_buf), format, backup_ap);
   va_end(backup_ap);
 
   if (result >= 0 && result < static_cast<int>(arraysize(stack_buf))) {
@@ -990,21 +934,17 @@ static void StringAppendVT(StringType* d
       // return -1 for reasons other than overflow without setting errno.
       DLOG(WARNING) << "Unable to printf the requested string due to size.";
       return;
     }
 
     std::vector<typename StringType::value_type> mem_buf(mem_length);
 
     // Restore the va_list before we use it again.
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-    base::va_copy(backup_ap, ap);
-#else
     base_va_copy(backup_ap, ap);
-#endif	// !defined(CHROMIUM_MOZILLA_BUILD)
 
     result = vsnprintfT(&mem_buf[0], mem_length, format, ap);
     va_end(backup_ap);
 
     if ((result >= 0) && (result < mem_length)) {
       // It fit.
       dst->append(&mem_buf[0], result);
       return;
@@ -1106,29 +1046,16 @@ std::string Uint64ToString(uint64 value)
   return IntToStringT<std::string, uint64, uint64, false>::
       IntToString(value);
 }
 std::wstring Uint64ToWString(uint64 value) {
   return IntToStringT<std::wstring, uint64, uint64, false>::
       IntToString(value);
 }
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-std::string DoubleToString(double value) {
-  // According to g_fmt.cc, it is sufficient to declare a buffer of size 32.
-  char buffer[32];
-  dmg_fp::g_fmt(buffer, value);
-  return std::string(buffer);
-}
-
-std::wstring DoubleToWString(double value) {
-  return ASCIIToWide(DoubleToString(value));
-}
-#endif
-
 void StringAppendV(std::string* dst, const char* format, va_list ap) {
   StringAppendVT(dst, format, ap);
 }
 
 void StringAppendV(std::wstring* dst, const wchar_t* format, va_list ap) {
   StringAppendVT(dst, format, ap);
 }
 
@@ -1490,17 +1417,17 @@ bool MatchPattern(const std::string& eva
 
 // For the various *ToInt conversions, there are no *ToIntTraits classes to use
 // because there's no such thing as strtoi.  Use *ToLongTraits through a cast
 // instead, requiring that long and int are compatible and equal-width.  They
 // are on our target platforms.
 
 // XXX Sigh.
 
-#if !defined(ARCH_CPU_64_BITS) || !defined(CHROMIUM_MOZILLA_BUILD)
+#if !defined(ARCH_CPU_64_BITS)
 bool StringToInt(const std::string& input, int* output) {
   COMPILE_ASSERT(sizeof(int) == sizeof(long), cannot_strtol_to_int);
   return StringToNumber<StringToLongTraits>(input,
                                             reinterpret_cast<long*>(output));
 }
 
 bool StringToInt(const string16& input, int* output) {
   COMPILE_ASSERT(sizeof(int) == sizeof(long), cannot_wcstol_to_int);
@@ -1523,27 +1450,27 @@ bool StringToInt(const string16& input, 
   long tmp;
   bool ok = StringToNumber<String16ToLongTraits>(input, &tmp);
   if (!ok || tmp > kint32max) {
     return false;
   }
   *output = static_cast<int>(tmp);
   return true;
 }
-#endif //  !defined(ARCH_CPU_64_BITS) || !defined(CHROMIUM_MOZILLA_BUILD)
+#endif //  !defined(ARCH_CPU_64_BITS)
 
 bool StringToInt64(const std::string& input, int64* output) {
   return StringToNumber<StringToInt64Traits>(input, output);
 }
 
 bool StringToInt64(const string16& input, int64* output) {
   return StringToNumber<String16ToInt64Traits>(input, output);
 }
 
-#if !defined(ARCH_CPU_64_BITS) || !defined(CHROMIUM_MOZILLA_BUILD)
+#if !defined(ARCH_CPU_64_BITS)
 bool HexStringToInt(const std::string& input, int* output) {
   COMPILE_ASSERT(sizeof(int) == sizeof(long), cannot_strtol_to_int);
   return StringToNumber<HexStringToLongTraits>(input,
                                                reinterpret_cast<long*>(output));
 }
 
 bool HexStringToInt(const string16& input, int* output) {
   COMPILE_ASSERT(sizeof(int) == sizeof(long), cannot_wcstol_to_int);
@@ -1567,17 +1494,17 @@ bool HexStringToInt(const string16& inpu
   bool ok = StringToNumber<HexString16ToLongTraits>(input, &tmp);
   if (!ok || tmp > kint32max) {
     return false;
   }
   *output = static_cast<int>(tmp);
   return true;
 }
 
-#endif // !defined(ARCH_CPU_64_BITS) || !defined(CHROMIUM_MOZILLA_BUILD)
+#endif // !defined(ARCH_CPU_64_BITS)
 
 namespace {
 
 template<class CHAR>
 bool HexDigitToIntT(const CHAR digit, uint8* val) {
   if (digit >= '0' && digit <= '9')
     *val = digit - '0';
   else if (digit >= 'a' && digit <= 'f')
@@ -1647,38 +1574,16 @@ int HexStringToInt(const std::string& va
 }
 
 int HexStringToInt(const string16& value) {
   int result;
   HexStringToInt(value, &result);
   return result;
 }
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-bool StringToDouble(const std::string& input, double* output) {
-  return StringToNumber<StringToDoubleTraits>(input, output);
-}
-
-bool StringToDouble(const string16& input, double* output) {
-  return StringToNumber<String16ToDoubleTraits>(input, output);
-}
-
-double StringToDouble(const std::string& value) {
-  double result;
-  StringToDouble(value, &result);
-  return result;
-}
-
-double StringToDouble(const string16& value) {
-  double result;
-  StringToDouble(value, &result);
-  return result;
-}
-#endif
-
 // The following code is compatible with the OpenBSD lcpy interface.  See:
 //   http://www.gratisoft.us/todd/papers/strlcpy.html
 //   ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/{wcs,str}lcpy.c
 
 namespace {
 
 template <typename CHAR>
 size_t lcpyT(CHAR* dst, const CHAR* src, size_t dst_size) {
--- a/ipc/chromium/src/base/string_util.h
+++ b/ipc/chromium/src/base/string_util.h
@@ -103,29 +103,25 @@ bool IsWprintfFormatPortable(const wchar
 #if defined(OS_WIN)
 #include "base/string_util_win.h"
 #elif defined(OS_POSIX)
 #include "base/string_util_posix.h"
 #else
 #error Define string operations appropriately for your platform
 #endif
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 namespace base {
-#endif
 // Returns a reference to a globally unique empty string that functions can
 // return.  Use this to avoid static construction of strings, not to replace
 // any and all uses of "std::string()" as nicer-looking sugar.
 // These functions are threadsafe.
 const std::string& EmptyString();
 const std::wstring& EmptyWString();
 const string16& EmptyString16();
-#ifdef CHROMIUM_MOZILLA_BUILD
 }
-#endif
 
 extern const wchar_t kWhitespaceWide[];
 extern const char kWhitespaceASCII[];
 
 // Names of codepages (charsets) understood by icu.
 extern const char* const kCodepageUTF8;
 
 // Removes characters in trim_chars from the beginning and end of input.
@@ -504,21 +500,17 @@ inline typename string_type::value_type*
   str->resize(length_with_null - 1);
   return &((*str)[0]);
 }
 
 //-----------------------------------------------------------------------------
 
 // Function objects to aid in comparing/searching strings.
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 template<typename Char> struct chromium_CaseInsensitiveCompare {
-#else
-template<typename Char> struct CaseInsensitiveCompare {
-#endif
  public:
   bool operator()(Char x, Char y) const {
     return tolower(x) == tolower(y);
   }
 };
 
 template<typename Char> struct CaseInsensitiveCompareASCII {
  public:
--- a/ipc/chromium/src/base/third_party/nspr/prtime.h
+++ b/ipc/chromium/src/base/third_party/nspr/prtime.h
@@ -50,23 +50,17 @@
  */
 
 #ifndef BASE_PRTIME_H__
 #define BASE_PRTIME_H__
 
 #include "base/logging.h"
 #include "base/third_party/nspr/prtypes.h"
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 PR_BEGIN_EXTERN_C
-#endif
-
-#ifndef CHROMIUM_MOZILLA_BUILD
-#define PR_ASSERT DCHECK
-#endif
 
 #define LL_I2L(l, i)    ((l) = (PRInt64)(i))
 #define LL_MUL(r, a, b) ((r) = (a) * (b))
 
 /**********************************************************************/
 /************************* TYPES AND CONSTANTS ************************/
 /**********************************************************************/
 
@@ -166,19 +160,17 @@ typedef struct PRExplodedTime {
  *         This number depends on both the geographic location and the
  *         current time.  Most of the DST rules are expressed in local
  *         current time.  If so, one should apply the time zone correction
  *         to GMT before applying the DST rules.
  */
 
 typedef PRTimeParameters (PR_CALLBACK *PRTimeParamFn)(const PRExplodedTime *gmt);
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 PR_END_EXTERN_C
-#endif
 
 namespace nspr {
 
 /**********************************************************************/
 /****************************** FUNCTIONS *****************************/
 /**********************************************************************/
 
 PRTime
--- a/ipc/chromium/src/build/build_config.h
+++ b/ipc/chromium/src/build/build_config.h
@@ -60,31 +60,15 @@
 #elif defined(__ppc__) || defined(__powerpc__)
 #define ARCH_CPU_PPC 1
 #define ARCH_CPU_32_BITS 1
 #else
 #error Please add support for your architecture in build/build_config.h
 #endif
 
 // Type detection for wchar_t.
-#ifndef CHROMIUM_MOZILLA_BUILD
-
-#if defined(OS_WIN)
-#define WCHAR_T_IS_UTF16
-#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
-    defined(__WCHAR_MAX__) && \
-    (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
-#define WCHAR_T_IS_UTF32
-#else
-#error Please add support for your compiler in build/build_config.h
-#endif
-
-#else // CHROMIUM_MOZILLA_BUILD
-
 #if defined(OS_WIN)
 #define WCHAR_T_IS_UTF16
 #else
 #define WCHAR_T_IS_UTF32
 #endif
 
-#endif // CHROMIUM_MOZILLA_BUILD
-
 #endif  // BUILD_BUILD_CONFIG_H_
--- a/ipc/chromium/src/chrome/common/child_process_host.cc
+++ b/ipc/chromium/src/chrome/common/child_process_host.cc
@@ -5,29 +5,22 @@
 #include "chrome/common/child_process_host.h"
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/message_loop.h"
 #include "base/process_util.h"
 #include "base/singleton.h"
 #include "base/waitable_event.h"
-#ifdef CHROMIUM_MOZILLA_BUILD
 #include "mozilla/ipc/ProcessChild.h"
 #include "mozilla/ipc/BrowserProcessSubThread.h"
 typedef mozilla::ipc::BrowserProcessSubThread ChromeThread;
-#else
-#include "chrome/browser/chrome_thread.h"
-#endif
 #include "chrome/common/ipc_logging.h"
 #include "chrome/common/notification_service.h"
 #include "chrome/common/notification_type.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "chrome/common/plugin_messages.h"
-#endif
 #include "chrome/common/process_watcher.h"
 #include "chrome/common/result_codes.h"
 
 
 namespace {
 typedef std::list<ChildProcessHost*> ChildProcessList;
 
 // The NotificationTask is used to notify about plugin process connection/
@@ -52,21 +45,17 @@ class ChildNotificationTask : public Tas
 
 }  // namespace
 
 
 
 ChildProcessHost::ChildProcessHost(
     ProcessType type, ResourceDispatcherHost* resource_dispatcher_host)
     :
-#ifdef CHROMIUM_MOZILLA_BUILD
       ChildProcessInfo(type),
-#else
-      Receiver(type),
-#endif
       ALLOW_THIS_IN_INITIALIZER_LIST(listener_(this)),
       resource_dispatcher_host_(resource_dispatcher_host),
       opening_channel_(false),
       process_event_(NULL) {
   Singleton<ChildProcessList>::get()->push_back(this);
 }
 
 
@@ -115,26 +104,22 @@ bool ChildProcessHost::Send(IPC::Message
   if (!channel_.get()) {
     delete msg;
     return false;
   }
   return channel_->Send(msg);
 }
 
 void ChildProcessHost::Notify(NotificationType type) {
-#ifdef CHROMIUM_MOZILLA_BUILD
   MessageLoop* loop = ChromeThread::GetMessageLoop(ChromeThread::IO);
   if (!loop)
       loop = mozilla::ipc::ProcessChild::message_loop();
   if (!loop)
       loop = MessageLoop::current();
   loop->PostTask(
-#else
-  resource_dispatcher_host_->ui_loop()->PostTask(
-#endif
       FROM_HERE, new ChildNotificationTask(type, this));
 }
 
 void ChildProcessHost::OnWaitableEventSignaled(base::WaitableEvent *event) {
 #if defined(OS_WIN)
   HANDLE object = event->handle();
   DCHECK(handle());
   DCHECK_EQ(object, handle());
@@ -142,20 +127,16 @@ void ChildProcessHost::OnWaitableEventSi
   bool did_crash = base::DidProcessCrash(NULL, object);
   if (did_crash) {
     // Report that this child process crashed.
     Notify(NotificationType::CHILD_PROCESS_CRASHED);
   }
   // Notify in the main loop of the disconnection.
   Notify(NotificationType::CHILD_PROCESS_HOST_DISCONNECTED);
 #endif
-
-#ifndef CHROMIUM_MOZILLA_BUILD
-  delete this;
-#endif
 }
 
 ChildProcessHost::ListenerHook::ListenerHook(ChildProcessHost* host)
     : host_(host) {
 }
 
 void ChildProcessHost::ListenerHook::OnMessageReceived(
     const IPC::Message& msg) {
@@ -166,81 +147,51 @@ void ChildProcessHost::ListenerHook::OnM
     return;
   }
 
   if (logger->Enabled())
     logger->OnPreDispatchMessage(msg);
 #endif
 
   bool msg_is_ok = true;
-#ifdef CHROMIUM_MOZILLA_BUILD
   bool handled = false;
-#else
-  bool handled = host_->resource_dispatcher_host_->OnMessageReceived(
-      msg, host_, &msg_is_ok);
-#endif
 
   if (!handled) {
-#ifdef CHROMIUM_MOZILLA_BUILD
-    if (0) {
-#else
-    if (msg.type() == PluginProcessHostMsg_ShutdownRequest::ID) {
-      // Must remove the process from the list now, in case it gets used for a
-      // new instance before our watcher tells us that the process terminated.
-      Singleton<ChildProcessList>::get()->remove(host_);
-      if (host_->CanShutdown())
-        host_->Send(new PluginProcessMsg_Shutdown());
-#endif
-    } else {
       host_->OnMessageReceived(msg);
-    }
   }
 
   if (!msg_is_ok)
     base::KillProcess(host_->handle(), ResultCodes::KILLED_BAD_MESSAGE, false);
 
 #ifdef IPC_MESSAGE_LOG_ENABLED
   if (logger->Enabled())
     logger->OnPostDispatchMessage(msg, host_->channel_id_);
 #endif
 }
 
 void ChildProcessHost::ListenerHook::OnChannelConnected(int32 peer_pid) {
   host_->opening_channel_ = false;
   host_->OnChannelConnected(peer_pid);
-#ifndef CHROMIUM_MOZILLA_BUILD
-  host_->Send(new PluginProcessMsg_AskBeforeShutdown());
-#endif
 
   // Notify in the main loop of the connection.
   host_->Notify(NotificationType::CHILD_PROCESS_HOST_CONNECTED);
 }
 
 void ChildProcessHost::ListenerHook::OnChannelError() {
   host_->opening_channel_ = false;
   host_->OnChannelError();
 }
 
 
 ChildProcessHost::Iterator::Iterator() : all_(true) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-  DCHECK(MessageLoop::current() ==
-      ChromeThread::GetMessageLoop(ChromeThread::IO)) <<
-          "ChildProcessInfo::Iterator must be used on the IO thread.";
-#endif
   iterator_ = Singleton<ChildProcessList>::get()->begin();
 }
 
 ChildProcessHost::Iterator::Iterator(ProcessType type)
     : all_(false), type_(type) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-  DCHECK(MessageLoop::current() ==
-      ChromeThread::GetMessageLoop(ChromeThread::IO)) <<
-          "ChildProcessInfo::Iterator must be used on the IO thread.";
-#endif
   iterator_ = Singleton<ChildProcessList>::get()->begin();
   if (!Done() && (*iterator_)->type() != type_)
     ++(*this);
 }
 
 ChildProcessHost* ChildProcessHost::Iterator::operator++() {
   do {
     ++iterator_;
--- a/ipc/chromium/src/chrome/common/child_process_host.h
+++ b/ipc/chromium/src/chrome/common/child_process_host.h
@@ -7,35 +7,27 @@
 
 #include "build/build_config.h"
 
 #include <list>
 
 #include "base/basictypes.h"
 #include "base/scoped_ptr.h"
 #include "base/waitable_event_watcher.h"
-#ifdef CHROMIUM_MOZILLA_BUILD
 class ResourceDispatcherHost;
-#else
-#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
-#endif
 #include "chrome/common/child_process_info.h"
 #include "chrome/common/ipc_channel.h"
 
 class NotificationType;
 
 // Plugins/workers and other child processes that live on the IO thread should
 // derive from this class.
 class ChildProcessHost :
-#ifdef CHROMIUM_MOZILLA_BUILD
                          public IPC::Message::Sender,
                          public ChildProcessInfo,
-#else
-                         public ResourceDispatcherHost::Receiver,
-#endif
                          public base::WaitableEventWatcher::Delegate,
                          public IPC::Channel::Listener {
  public:
   virtual ~ChildProcessHost();
 
   // ResourceDispatcherHost::Receiver implementation:
   virtual bool Send(IPC::Message* msg);
 
@@ -79,38 +71,30 @@ class ChildProcessHost :
   // IPC::Channel::Listener implementation:
   virtual void OnMessageReceived(const IPC::Message& msg) { }
   virtual void OnChannelConnected(int32 peer_pid) { }
   virtual void OnChannelError() { }
 
   bool opening_channel() { return opening_channel_; }
   const std::wstring& channel_id() { return channel_id_; }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
   base::WaitableEvent* GetProcessEvent() { return process_event_.get(); }
-#endif
 
   const IPC::Channel& channel() const { return *channel_; }
-#ifdef CHROMIUM_MOZILLA_BUILD
   IPC::Channel* channelp() const { return channel_.get(); }
-#endif
 
  private:
   // Sends the given notification to the notification service on the UI thread.
   void Notify(NotificationType type);
 
-#ifdef CHROMIUM_MOZILLA_BUILD
  protected:
-#endif
   // WaitableEventWatcher::Delegate implementation:
   virtual void OnWaitableEventSignaled(base::WaitableEvent *event);
-#ifdef CHROMIUM_MOZILLA_BUILD
+
  private:
-#endif
-
   // By using an internal class as the IPC::Channel::Listener, we can intercept
   // OnMessageReceived/OnChannelConnected and do our own processing before
   // calling the subclass' implementation.
   class ListenerHook : public IPC::Channel::Listener {
    public:
     ListenerHook(ChildProcessHost* host);
     virtual void OnMessageReceived(const IPC::Message& msg);
     virtual void OnChannelConnected(int32 peer_pid);
--- a/ipc/chromium/src/chrome/common/child_process_info.cc
+++ b/ipc/chromium/src/chrome/common/child_process_info.cc
@@ -1,26 +1,20 @@
 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "chrome/common/child_process_info.h"
 
 #include <limits>
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "app/l10n_util.h"
-#endif
 #include "base/logging.h"
 #include "base/process_util.h"
 #include "base/rand_util.h"
 #include "base/string_util.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "grit/generated_resources.h"
-#endif
 
 std::wstring ChildProcessInfo::GetTypeNameInEnglish(
     ChildProcessInfo::ProcessType type) {
   switch (type) {
     case BROWSER_PROCESS:
       return L"Browser";
     case RENDER_PROCESS:
       return L"Tab";
@@ -31,40 +25,17 @@ std::wstring ChildProcessInfo::GetTypeNa
     case UNKNOWN_PROCESS:
       default:
       DCHECK(false) << "Unknown child process type!";
       return L"Unknown";
     }
 }
 
 std::wstring ChildProcessInfo::GetLocalizedTitle() const {
-#ifdef CHROMIUM_MOZILLA_BUILD
   return name_;
-#else
-  std::wstring title = name_;
-  if (type_ == ChildProcessInfo::PLUGIN_PROCESS && title.empty())
-    title = l10n_util::GetString(IDS_TASK_MANAGER_UNKNOWN_PLUGIN_NAME);
-
-  int message_id;
-  if (type_ == ChildProcessInfo::PLUGIN_PROCESS) {
-    message_id = IDS_TASK_MANAGER_PLUGIN_PREFIX;
-  } else if (type_ == ChildProcessInfo::WORKER_PROCESS) {
-    message_id = IDS_TASK_MANAGER_WORKER_PREFIX;
-  } else {
-    DCHECK(false) << "Need localized name for child process type.";
-    return title;
-  }
-
-  // Explicitly mark name as LTR if there is no strong RTL character,
-  // to avoid the wrong concatenation result similar to "!Yahoo! Mail: the
-  // best web-based Email: NIGULP", in which "NIGULP" stands for the Hebrew
-  // or Arabic word for "plugin".
-  l10n_util::AdjustStringForLocaleDirection(title, &title);
-  return l10n_util::GetStringF(message_id, title);
-#endif
 }
 
 ChildProcessInfo::ChildProcessInfo(ProcessType type) {
   // This constructor is only used by objects which derive from this class,
   // which means *this* is a real object that refers to a child process, and not
   // just a simple object that contains information about it.  So add it to our
   // list of running processes.
   type_ = type;
--- a/ipc/chromium/src/chrome/common/child_thread.cc
+++ b/ipc/chromium/src/chrome/common/child_thread.cc
@@ -4,40 +4,28 @@
 
 #include "chrome/common/child_thread.h"
 
 #include "base/string_util.h"
 #include "base/command_line.h"
 #include "chrome/common/child_process.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/ipc_logging.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "chrome/common/plugin_messages.h"
-#include "webkit/glue/webkit_glue.h"
-#endif
 
 // V8 needs a 1MB stack size.
 const size_t ChildThread::kV8StackSize = 1024 * 1024;
 
 ChildThread::ChildThread(Thread::Options options)
     : Thread("Chrome_ChildThread"),
       owner_loop_(MessageLoop::current()),
       options_(options),
       check_with_browser_before_shutdown_(false) {
   DCHECK(owner_loop_);
   channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValue(
       switches::kProcessChannelID);
-
-  if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-    webkit_glue::SetUserAgent(WideToUTF8(
-        CommandLine::ForCurrentProcess()->GetSwitchValue(
-            switches::kUserAgent)));
-#endif
-  }
 }
 
 ChildThread::~ChildThread() {
 }
 
 bool ChildThread::Run() {
   return StartWithOptions(options_);
 }
@@ -63,81 +51,44 @@ void ChildThread::AddRoute(int32 routing
 
 void ChildThread::RemoveRoute(int32 routing_id) {
   DCHECK(MessageLoop::current() == message_loop());
 
   router_.RemoveRoute(routing_id);
 }
 
 void ChildThread::OnMessageReceived(const IPC::Message& msg) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-  // Resource responses are sent to the resource dispatcher.
-  if (resource_dispatcher_->OnMessageReceived(msg))
-    return;
-
-  if (msg.type() == PluginProcessMsg_AskBeforeShutdown::ID) {
-    check_with_browser_before_shutdown_ = true;
-    return;
-  }
-
-  if (msg.type() == PluginProcessMsg_Shutdown::ID) {
-    owner_loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask());
-    return;
-  }
-#endif
-
   if (msg.routing_id() == MSG_ROUTING_CONTROL) {
     OnControlMessageReceived(msg);
   } else {
     router_.OnMessageReceived(msg);
   }
 }
 
 ChildThread* ChildThread::current() {
   return ChildProcess::current()->child_thread();
 }
 
 void ChildThread::Init() {
-#ifndef CHROMIUM_MOZILLA_BUILD
-  channel_.reset(new IPC::SyncChannel(channel_name_,
-      IPC::Channel::MODE_CLIENT, this, NULL, owner_loop_, true,
-      ChildProcess::current()->GetShutDownEvent()));
-#else
   channel_.reset(new IPC::Channel(channel_name_,
                                   IPC::Channel::MODE_CLIENT,
                                   this));
-#endif
 
 #ifdef IPC_MESSAGE_LOG_ENABLED
   IPC::Logging::current()->SetIPCSender(this);
 #endif
-
-#ifndef CHROMIUM_MOZILLA_BUILD
-  resource_dispatcher_.reset(new ResourceDispatcher(this));
-#endif
 }
 
 void ChildThread::CleanUp() {
 #ifdef IPC_MESSAGE_LOG_ENABLED
   IPC::Logging::current()->SetIPCSender(NULL);
 #endif
   // Need to destruct the SyncChannel to the browser before we go away because
   // it caches a pointer to this thread.
   channel_.reset();
-#ifndef CHROMIUM_MOZILLA_BUILD
-  resource_dispatcher_.reset();
-#endif
 }
 
 void ChildThread::OnProcessFinalRelease() {
   if (!check_with_browser_before_shutdown_) {
     owner_loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask());
     return;
   }
-
-#ifndef CHROMIUM_MOZILLA_BUILD
-  // The child process shutdown sequence is a request response based mechanism,
-  // where we send out an initial feeler request to the child process host
-  // instance in the browser to verify if it's ok to shutdown the child process.
-  // The browser then sends back a response if it's ok to shutdown.
-  Send(new PluginProcessHostMsg_ShutdownRequest);
-#endif
 }
--- a/ipc/chromium/src/chrome/common/child_thread.h
+++ b/ipc/chromium/src/chrome/common/child_thread.h
@@ -4,21 +4,17 @@
 
 #ifndef CHROME_COMMON_CHILD_THREAD_H_
 #define CHROME_COMMON_CHILD_THREAD_H_
 
 #include "base/thread.h"
 #include "chrome/common/ipc_sync_channel.h"
 #include "chrome/common/message_router.h"
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 class ResourceDispatcher;
-#else
-#include "chrome/common/resource_dispatcher.h"
-#endif
 
 // Child processes's background thread should derive from this class.
 class ChildThread : public IPC::Channel::Listener,
                     public IPC::Message::Sender,
                     public base::Thread {
  public:
   // Creates the thread.
   ChildThread(Thread::Options options);
@@ -28,22 +24,16 @@ class ChildThread : public IPC::Channel:
   virtual bool Send(IPC::Message* msg);
 
   // See documentation on MessageRouter for AddRoute and RemoveRoute
   void AddRoute(int32 routing_id, IPC::Channel::Listener* listener);
   void RemoveRoute(int32 routing_id);
 
   MessageLoop* owner_loop() { return owner_loop_; }
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-  ResourceDispatcher* resource_dispatcher() {
-    return resource_dispatcher_.get();
-  }
-#endif
-
  protected:
   friend class ChildProcess;
 
   // Starts the thread.
   bool Run();
 
   // Overrides the channel name.  Used for --single-process mode.
   void SetChannelName(const std::wstring& name) { channel_name_ = name; }
@@ -55,53 +45,39 @@ class ChildThread : public IPC::Channel:
   // The required stack size if V8 runs on a thread.
   static const size_t kV8StackSize;
 
   virtual void OnControlMessageReceived(const IPC::Message& msg) { }
 
   // Returns the one child thread.
   static ChildThread* current();
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-  IPC::SyncChannel* channel() { return channel_.get(); }
-#else
   IPC::Channel* channel() { return channel_.get(); }
-#endif
 
   // Thread implementation.
   virtual void Init();
   virtual void CleanUp();
 
  private:
   // IPC::Channel::Listener implementation:
   virtual void OnMessageReceived(const IPC::Message& msg);
   virtual void OnChannelError();
 
   // The message loop used to run tasks on the thread that started this thread.
   MessageLoop* owner_loop_;
 
   std::wstring channel_name_;
-#ifndef CHROMIUM_MOZILLA_BUILD
-  scoped_ptr<IPC::SyncChannel> channel_;
-#else
   scoped_ptr<IPC::Channel> channel_;
-#endif
 
   // Used only on the background render thread to implement message routing
   // functionality to the consumers of the ChildThread.
   MessageRouter router_;
 
   Thread::Options options_;
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-  // Handles resource loads for this process.
-  // NOTE: this object lives on the owner thread.
-  scoped_ptr<ResourceDispatcher> resource_dispatcher_;
-#endif
-
   // If true, checks with the browser process before shutdown.  This avoids race
   // conditions if the process refcount is 0 but there's an IPC message inflight
   // that would addref it.
   bool check_with_browser_before_shutdown_;
 
   DISALLOW_EVIL_CONSTRUCTORS(ChildThread);
 };
 
--- a/ipc/chromium/src/chrome/common/chrome_paths.cc
+++ b/ipc/chromium/src/chrome/common/chrome_paths.cc
@@ -27,197 +27,16 @@ bool GetGearsPluginPathFromCommandLine(F
   *path = FilePath::FromWStringHack(plugin_path);
   return !plugin_path.empty();
 #else
   return false;
 #endif
 }
 
 bool PathProvider(int key, FilePath* result) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-  // Some keys are just aliases...
-  switch (key) {
-    case chrome::DIR_APP:
-      return PathService::Get(base::DIR_MODULE, result);
-    case chrome::DIR_LOGS:
-#ifndef NDEBUG
-      return PathService::Get(chrome::DIR_USER_DATA, result);
-#else
-      return PathService::Get(base::DIR_EXE, result);
-#endif
-    case chrome::FILE_RESOURCE_MODULE:
-      return PathService::Get(base::FILE_MODULE, result);
-  }
-
-  // Assume that we will not need to create the directory if it does not exist.
-  // This flag can be set to true for the cases where we want to create it.
-  bool create_dir = false;
-
-  FilePath cur;
-  switch (key) {
-    case chrome::DIR_USER_DATA:
-      if (!GetDefaultUserDataDirectory(&cur))
-        return false;
-      create_dir = true;
-      break;
-    case chrome::DIR_USER_DOCUMENTS:
-      if (!GetUserDocumentsDirectory(&cur))
-        return false;
-      create_dir = true;
-      break;
-    case chrome::DIR_DEFAULT_DOWNLOADS:
-      if (!GetUserDownloadsDirectory(&cur))
-        return false;
-      break;
-    case chrome::DIR_CRASH_DUMPS:
-      // The crash reports are always stored relative to the default user data
-      // directory.  This avoids the problem of having to re-initialize the
-      // exception handler after parsing command line options, which may
-      // override the location of the app's profile directory.
-      if (!GetDefaultUserDataDirectory(&cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("Crash Reports"));
-      create_dir = true;
-      break;
-    case chrome::DIR_USER_DESKTOP:
-      if (!GetUserDesktop(&cur))
-        return false;
-      break;
-    case chrome::DIR_RESOURCES:
-      if (!PathService::Get(chrome::DIR_APP, &cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("resources"));
-      create_dir = true;
-      break;
-    case chrome::DIR_INSPECTOR:
-      if (!PathService::Get(chrome::DIR_APP, &cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("resources"));
-      cur = cur.Append(FILE_PATH_LITERAL("inspector"));
-      break;
-    case chrome::DIR_THEMES:
-      if (!PathService::Get(chrome::DIR_APP, &cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("themes"));
-      create_dir = true;
-      break;
-    case chrome::DIR_LOCALES:
-      if (!PathService::Get(chrome::DIR_APP, &cur))
-        return false;
-#if defined(OS_MACOSX)
-      // On Mac, locale files are in Contents/Resources, a sibling of the
-      // App dir.
-      cur = cur.DirName();
-      cur = cur.Append(FILE_PATH_LITERAL("Resources"));
-#else
-      cur = cur.Append(FILE_PATH_LITERAL("locales"));
-#endif
-      create_dir = true;
-      break;
-    case chrome::DIR_APP_DICTIONARIES:
-#if defined(OS_LINUX)
-      // We can't write into the EXE dir on Linux, so keep dictionaries
-      // alongside the safe browsing database in the user data dir.
-      if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
-        return false;
-#else
-      if (!PathService::Get(base::DIR_EXE, &cur))
-        return false;
-#endif
-      cur = cur.Append(FILE_PATH_LITERAL("Dictionaries"));
-      create_dir = true;
-      break;
-    case chrome::FILE_LOCAL_STATE:
-      if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
-        return false;
-#ifdef CHROMIUM_MOZILLA_BUILD
-      cur = cur.Append(FILE_PATH_LITERAL("Local State"));
-#else
-      cur = cur.Append(chrome::kLocalStateFilename);
-#endif
-      break;
-    case chrome::FILE_RECORDED_SCRIPT:
-      if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("script.log"));
-      break;
-    case chrome::FILE_GEARS_PLUGIN:
-      if (!GetGearsPluginPathFromCommandLine(&cur)) {
-#if defined(OS_WIN)
-        // Search for gears.dll alongside chrome.dll first.  This new model
-        // allows us to package gears.dll with the Chrome installer and update
-        // it while Chrome is running.
-        if (!PathService::Get(base::DIR_MODULE, &cur))
-          return false;
-        cur = cur.Append(FILE_PATH_LITERAL("gears.dll"));
-
-        if (!file_util::PathExists(cur)) {
-          if (!PathService::Get(base::DIR_EXE, &cur))
-            return false;
-          cur = cur.Append(FILE_PATH_LITERAL("plugins"));
-          cur = cur.Append(FILE_PATH_LITERAL("gears"));
-          cur = cur.Append(FILE_PATH_LITERAL("gears.dll"));
-        }
-#else
-        // No gears.dll on non-Windows systems.
-        return false;
-#endif
-      }
-      break;
-    // The following are only valid in the development environment, and
-    // will fail if executed from an installed executable (because the
-    // generated path won't exist).
-    case chrome::DIR_TEST_DATA:
-      if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("chrome"));
-      cur = cur.Append(FILE_PATH_LITERAL("test"));
-      cur = cur.Append(FILE_PATH_LITERAL("data"));
-      if (!file_util::PathExists(cur))  // we don't want to create this
-        return false;
-      break;
-    case chrome::DIR_TEST_TOOLS:
-      if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("chrome"));
-      cur = cur.Append(FILE_PATH_LITERAL("tools"));
-      cur = cur.Append(FILE_PATH_LITERAL("test"));
-      if (!file_util::PathExists(cur))  // we don't want to create this
-        return false;
-      break;
-    case chrome::FILE_PYTHON_RUNTIME:
-      if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("third_party"));
-      cur = cur.Append(FILE_PATH_LITERAL("python_24"));
-      cur = cur.Append(FILE_PATH_LITERAL("python.exe"));
-      if (!file_util::PathExists(cur))  // we don't want to create this
-        return false;
-      break;
-    case chrome::FILE_TEST_SERVER:
-      if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
-        return false;
-      cur = cur.Append(FILE_PATH_LITERAL("net"));
-      cur = cur.Append(FILE_PATH_LITERAL("tools"));
-      cur = cur.Append(FILE_PATH_LITERAL("test"));
-      cur = cur.Append(FILE_PATH_LITERAL("testserver"));
-      cur = cur.Append(FILE_PATH_LITERAL("testserver.py"));
-      if (!file_util::PathExists(cur))  // we don't want to create this
-        return false;
-      break;
-    default:
-      return false;
-  }
-
-  if (create_dir && !file_util::PathExists(cur) &&
-      !file_util::CreateDirectory(cur))
-    return false;
-
-  *result = cur;
-#endif
   return true;
 }
 
 // This cannot be done as a static initializer sadly since Visual Studio will
 // eliminate this object file if there is no direct entry point into it.
 void RegisterPathProvider() {
   PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
 }
--- a/ipc/chromium/src/chrome/common/chrome_paths_linux.cc
+++ b/ipc/chromium/src/chrome/common/chrome_paths_linux.cc
@@ -4,19 +4,16 @@
 
 #include "chrome/common/chrome_paths_internal.h"
 
 #include <glib.h>
 #include <stdlib.h>
 
 #include "base/file_path.h"
 #include "base/path_service.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "chrome/third_party/xdg_user_dirs/xdg_user_dir_lookup.h"
-#endif // ifndef CHROMIUM_MOZILLA_BUILD
 
 namespace {
 
 FilePath GetHomeDir() {
   const char *home_dir = getenv("HOME");
 
   if (home_dir && home_dir[0])
     return FilePath(home_dir);
@@ -31,24 +28,16 @@ FilePath GetHomeDir() {
 
   /* last resort */
   return FilePath("/tmp/");
 }
 
 // Wrapper around xdg_user_dir_lookup() from
 // src/chrome/third_party/xdg-user-dirs
 FilePath GetXDGUserDirectory(const char* env_name, const char* fallback_dir) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-  char* xdg_dir = xdg_user_dir_lookup(env_name);
-  if (xdg_dir) {
-    FilePath rv(xdg_dir);
-    free(xdg_dir);
-    return rv;
-  }
-#endif // ifndef CHROMIUM_MOZILLA_BUILD
   return GetHomeDir().Append(fallback_dir);
 }
 
 // |env_name| is the name of an environment variable that we want to use to get
 // a directory path. |fallback_dir| is the directory relative to $HOME that we
 // use if |env_name| cannot be found or is empty. |fallback_dir| may be NULL.
 FilePath GetXDGDirectory(const char* env_name, const char* fallback_dir) {
   const char* env_value = getenv(env_name);
--- a/ipc/chromium/src/chrome/common/env_vars.h
+++ b/ipc/chromium/src/chrome/common/env_vars.h
@@ -2,17 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 // Defines all the environment variables used by Chrome.
 
 #ifndef CHROME_COMMON_ENV_VARS_H__
 #define CHROME_COMMON_ENV_VARS_H__
 
-#if defined(CHROMIUM_MOZILLA_BUILD) && defined(COMPILER_MSVC)
+#if defined(COMPILER_MSVC)
 #include <string.h>
 #endif
 
 namespace env_vars {
 
 extern const wchar_t kHeadless[];
 extern const wchar_t kLogFileName[];
 extern const wchar_t kShowRestart[];
--- a/ipc/chromium/src/chrome/common/ipc_channel.h
+++ b/ipc/chromium/src/chrome/common/ipc_channel.h
@@ -54,48 +54,42 @@ class Channel : public Message::Sender {
   // client mode.  In server mode, the Channel is responsible for setting up the
   // IPC object, whereas in client mode, the Channel merely connects to the
   // already established IPC object.
   // |listener| receives a callback on the current thread for each newly
   // received message.
   //
   Channel(const std::wstring& channel_id, Mode mode, Listener* listener);
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   // XXX it would nice not to have yet more platform-specific code in
   // here but it's just not worth the trouble.
 # if defined(OS_POSIX)
   // Connect to a pre-created channel |fd| as |mode|.
   Channel(int fd, Mode mode, Listener* listener);
 # elif defined(OS_WIN)
   // Connect to a pre-created channel as |mode|.  Clients connect to
   // the pre-existing server pipe, and servers take over |server_pipe|.
   Channel(const std::wstring& channel_id, void* server_pipe,
 	  Mode mode, Listener* listener);
 # endif
-#endif
 
   ~Channel();
 
   // Connect the pipe.  On the server side, this will initiate
   // waiting for connections.  On the client, it attempts to
   // connect to a pre-existing pipe.  Note, calling Connect()
   // will not block the calling thread and may complete
   // asynchronously.
   bool Connect();
 
   // Close this Channel explicitly.  May be called multiple times.
   void Close();
 
   // Modify the Channel's listener.
-#ifdef CHROMIUM_MOZILLA_BUILD
   Listener* set_listener(Listener* listener);
-#else
-  void set_listener(Listener* listener);
-#endif
 
   // Send a message over the Channel to the listener on the other end.
   //
   // |message| must be allocated using operator new.  This object will be
   // deleted once the contents of the Message have been sent.
   //
   //  FIXME bug 551500: the channel does not notice failures, so if the
   //    renderer crashes, it will silently succeed, leaking the parameter.
@@ -109,25 +103,21 @@ class Channel : public Message::Sender {
   // mapping it into the Child process.
   // This method may only be called on the server side of a channel.
   //
   // If the kTestingChannelID flag is specified on the command line then
   // a named FIFO is used as the channel transport mechanism rather than a
   // socketpair() in which case this method returns -1 for both parameters.
   void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) const;
 
-# if defined(CHROMIUM_MOZILLA_BUILD)
   // Return the server side of the socketpair.
   int GetServerFileDescriptor() const;
-# endif
 #elif defined(OS_WIN)
-# if defined(CHROMIUM_MOZILLA_BUILD)
   // Return the server pipe handle.
   void* GetServerPipeHandle() const;
-# endif
 #endif  // defined(OS_POSIX)
 
  private:
   // PIMPL to which all channel calls are delegated.
   class ChannelImpl;
   ChannelImpl *channel_impl_;
 
   // The Hello message is internal to the Channel class.  It is sent
--- a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
+++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
@@ -233,29 +233,27 @@ bool ClientConnectToFifo(const std::stri
     HANDLE_EINTR(close(fd));
     return false;
   }
 
   *client_socket = fd;
   return true;
 }
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 bool SetCloseOnExec(int fd) {
   int flags = fcntl(fd, F_GETFD);
   if (flags == -1)
     return false;
 
   flags |= FD_CLOEXEC;
   if (fcntl(fd, F_SETFD, flags) == -1)
     return false;
 
   return true;
 }
-#endif
 
 }  // namespace
 //------------------------------------------------------------------------------
 
 Channel::ChannelImpl::ChannelImpl(const std::wstring& channel_id, Mode mode,
                                   Listener* listener)
     : factory_(this) {
   Init(mode, listener);
@@ -322,24 +320,22 @@ bool Channel::ChannelImpl::CreatePipe(co
       // Set both ends to be non-blocking.
       if (fcntl(pipe_fds[0], F_SETFL, O_NONBLOCK) == -1 ||
           fcntl(pipe_fds[1], F_SETFL, O_NONBLOCK) == -1) {
         HANDLE_EINTR(close(pipe_fds[0]));
         HANDLE_EINTR(close(pipe_fds[1]));
         return false;
       }
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
       if (!SetCloseOnExec(pipe_fds[0]) ||
           !SetCloseOnExec(pipe_fds[1])) {
         HANDLE_EINTR(close(pipe_fds[0]));
         HANDLE_EINTR(close(pipe_fds[1]));
         return false;
       }
-#endif
 
       pipe_ = pipe_fds[0];
       client_pipe_ = pipe_fds[1];
 
       Singleton<PipeMap>()->Insert(pipe_name_, client_pipe_);
     } else {
       pipe_ = ChannelNameToClientFD(pipe_name_);
       DCHECK(pipe_ > 0);
@@ -683,19 +679,16 @@ bool Channel::ChannelImpl::ProcessOutgoi
       output_queue_.pop();
       delete msg;
     }
   }
   return true;
 }
 
 bool Channel::ChannelImpl::Send(Message* message) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-  chrome::Counters::ipc_send_counter().Increment();
-#endif
 #ifdef IPC_MESSAGE_DEBUG_EXTRA
   DLOG(INFO) << "sending message @" << message << " on channel @" << this
              << " with type " << message->type()
              << " (" << output_queue_.size() << " in queue)";
 #endif
 
 #ifdef IPC_MESSAGE_LOG_ENABLED
   Logging::current()->OnSendMessage(message, L"");
@@ -819,51 +812,41 @@ void Channel::ChannelImpl::Close() {
 
 //------------------------------------------------------------------------------
 // Channel's methods simply call through to ChannelImpl.
 Channel::Channel(const std::wstring& channel_id, Mode mode,
                  Listener* listener)
     : channel_impl_(new ChannelImpl(channel_id, mode, listener)) {
 }
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 Channel::Channel(int fd, Mode mode, Listener* listener)
     : channel_impl_(new ChannelImpl(fd, mode, listener)) {
 }
-#endif
 
 Channel::~Channel() {
   delete channel_impl_;
 }
 
 bool Channel::Connect() {
   return channel_impl_->Connect();
 }
 
 void Channel::Close() {
   channel_impl_->Close();
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 Channel::Listener* Channel::set_listener(Listener* listener) {
   return channel_impl_->set_listener(listener);
 }
-#else
-void Channel::set_listener(Listener* listener) {
-  channel_impl_->set_listener(listener);
-}
-#endif
 
 bool Channel::Send(Message* message) {
   return channel_impl_->Send(message);
 }
 
 void Channel::GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) const {
   return channel_impl_->GetClientFileDescriptorMapping(src_fd, dest_fd);
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 int Channel::GetServerFileDescriptor() const {
   return channel_impl_->GetServerFileDescriptor();
 }
-#endif
 
 }  // namespace IPC
--- a/ipc/chromium/src/chrome/common/ipc_channel_posix.h
+++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.h
@@ -23,33 +23,27 @@ namespace IPC {
 class Channel::ChannelImpl : public MessageLoopForIO::Watcher {
  public:
   // Mirror methods of Channel, see ipc_channel.h for description.
   ChannelImpl(const std::wstring& channel_id, Mode mode, Listener* listener);
   ChannelImpl(int fd, Mode mode, Listener* listener);
   ~ChannelImpl() { Close(); }
   bool Connect();
   void Close();
-#ifdef CHROMIUM_MOZILLA_BUILD
   Listener* set_listener(Listener* listener) {
     Listener* old = listener_;
     listener_ = listener;
     return old;
   }
-#else
-  void set_listener(Listener* listener) { listener_ = listener; }
-#endif
   bool Send(Message* message);
   void GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) const;
-#ifdef CHROMIUM_MOZILLA_BUILD
   int GetServerFileDescriptor() const {
     DCHECK(mode_ == MODE_SERVER);
     return pipe_;
   }
-#endif
 
  private:
   void Init(Mode mode, Listener* listener);
   bool CreatePipe(const std::wstring& channel_id, Mode mode);
   bool EnqueueHelloMessage();
 
   bool ProcessIncomingMessages();
   bool ProcessOutgoingMessages();
--- a/ipc/chromium/src/chrome/common/ipc_channel_win.cc
+++ b/ipc/chromium/src/chrome/common/ipc_channel_win.cc
@@ -40,17 +40,16 @@ Channel::ChannelImpl::ChannelImpl(const 
 
   if (!CreatePipe(channel_id, mode)) {
     // The pipe may have been closed already.
     LOG(WARNING) << "Unable to create pipe named \"" << channel_id <<
                     "\" in " << (mode == 0 ? "server" : "client") << " mode.";
   }
 }
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 Channel::ChannelImpl::ChannelImpl(const std::wstring& channel_id,
                                   HANDLE server_pipe,
                                   Mode mode, Listener* listener)
     : ALLOW_THIS_IN_INITIALIZER_LIST(input_state_(this)),
       ALLOW_THIS_IN_INITIALIZER_LIST(output_state_(this)),
       ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {
   Init(mode, listener);
 
@@ -69,17 +68,16 @@ void Channel::ChannelImpl::Init(Mode mod
   listener_ = listener;
   waiting_connect_ = (mode == MODE_SERVER);
   processing_incoming_ = false;
 }
 
 HANDLE Channel::ChannelImpl::GetServerPipeHandle() const {
   return pipe_;
 }
-#endif
 
 void Channel::ChannelImpl::Close() {
   if (thread_check_.get()) {
     DCHECK(thread_check_->CalledOnValidThread());
   }
 
   bool waited = false;
   if (input_state_.is_pending || output_state_.is_pending) {
@@ -89,29 +87,20 @@ void Channel::ChannelImpl::Close() {
 
   // Closing the handle at this point prevents us from issuing more requests
   // form OnIOCompleted().
   if (pipe_ != INVALID_HANDLE_VALUE) {
     CloseHandle(pipe_);
     pipe_ = INVALID_HANDLE_VALUE;
   }
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-  // Make sure all IO has completed.
-  base::Time start = base::Time::Now();
-#endif
   while (input_state_.is_pending || output_state_.is_pending) {
     MessageLoopForIO::current()->WaitForIOCompletion(INFINITE, this);
   }
-#ifndef CHROMIUM_MOZILLA_BUILD
-  if (waited) {
-    // We want to see if we block the message loop for too long.
-    UMA_HISTOGRAM_TIMES("AsyncIO.IPCChannelClose", base::Time::Now() - start);
-  }
-#endif
+
   while (!output_queue_.empty()) {
     Message* m = output_queue_.front();
     output_queue_.pop();
     delete m;
   }
 
   if (thread_check_.get())
     thread_check_.reset();
@@ -206,20 +195,16 @@ bool Channel::ChannelImpl::EnqueueHelloM
     return false;
   }
 
   output_queue_.push(m.release());
   return true;
 }
 
 bool Channel::ChannelImpl::Connect() {
-#ifndef CHROMIUM_MOZILLA_BUILD
-  DLOG(WARNING) << "Connect called twice";
-#endif
-
   if (!thread_check_.get())
     thread_check_.reset(new NonThreadSafe());
 
   if (pipe_ == INVALID_HANDLE_VALUE)
     return false;
 
   MessageLoopForIO::current()->RegisterIOHandler(pipe_, this);
 
@@ -454,46 +439,38 @@ void Channel::ChannelImpl::OnIOCompleted
 
 //------------------------------------------------------------------------------
 // Channel's methods simply call through to ChannelImpl.
 Channel::Channel(const std::wstring& channel_id, Mode mode,
                  Listener* listener)
     : channel_impl_(new ChannelImpl(channel_id, mode, listener)) {
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 Channel::Channel(const std::wstring& channel_id, void* server_pipe,
                  Mode mode, Listener* listener)
    : channel_impl_(new ChannelImpl(channel_id, server_pipe, mode, listener)) {
 }
-#endif
 
 Channel::~Channel() {
   delete channel_impl_;
 }
 
 bool Channel::Connect() {
   return channel_impl_->Connect();
 }
 
 void Channel::Close() {
   channel_impl_->Close();
 }
 
-#ifdef CHROMIUM_MOZILLA_BUILD
 void* Channel::GetServerPipeHandle() const {
   return channel_impl_->GetServerPipeHandle();
 }
 
 Channel::Listener* Channel::set_listener(Listener* listener) {
   return channel_impl_->set_listener(listener);
 }
-#else
-void Channel::set_listener(Listener* listener) {
-  channel_impl_->set_listener(listener);
-}
-#endif
 
 bool Channel::Send(Message* message) {
   return channel_impl_->Send(message);
 }
 
 }  // namespace IPC
--- a/ipc/chromium/src/chrome/common/ipc_channel_win.h
+++ b/ipc/chromium/src/chrome/common/ipc_channel_win.h
@@ -24,27 +24,22 @@ class Channel::ChannelImpl : public Mess
               Mode mode, Listener* listener);
   ~ChannelImpl() { 
     if (pipe_ != INVALID_HANDLE_VALUE) {
       Close();
     }
   }
   bool Connect();
   void Close();
-#ifdef CHROMIUM_MOZILLA_BUILD
   HANDLE GetServerPipeHandle() const;
-
   Listener* set_listener(Listener* listener) {
     Listener* old = listener_;
     listener_ = listener;
     return old;
   }
-#else
-  void set_listener(Listener* listener) { listener_ = listener; }
-#endif
   bool Send(Message* message);
  private:
   void Init(Mode mode, Listener* listener);
   const std::wstring PipeName(const std::wstring& channel_id) const;
   bool CreatePipe(const std::wstring& channel_id, Mode mode);
   bool EnqueueHelloMessage();
 
   bool ProcessConnection();
--- a/ipc/chromium/src/chrome/common/ipc_logging.cc
+++ b/ipc/chromium/src/chrome/common/ipc_logging.cc
@@ -18,31 +18,16 @@
 #include "base/thread.h"
 #include "base/time.h"
 #include "base/waitable_event.h"
 #include "base/waitable_event_watcher.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/ipc_sync_message.h"
 #include "chrome/common/ipc_message_utils.h"
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-// This include list should contain all _messages.h header files so that they
-// can get *MsgLog function etc. This makes ipc logs much more informative.
-#include "chrome/common/render_messages.h"
-#include "chrome/test/automation/automation_messages.h"
-
-#if defined(OS_WIN)
-// Pulling this file in Mac/Linux causes a lot of binaries to need to bring in
-// WebKit and all the dependencies, which results in a very large number of
-// linker errors.
-#include "chrome/common/plugin_messages.h"
-#endif
-
-#endif
-
 #if defined(OS_POSIX)
 #include "base/string_util.h"
 #include <unistd.h>
 #endif
 
 #ifdef IPC_MESSAGE_LOG_ENABLED
 
 using base::Time;
@@ -96,20 +81,16 @@ Logging::Logging()
   logging_event_on_.reset(new base::WaitableEvent(
       CreateEvent(NULL, TRUE, FALSE, event_name.c_str())));
 
   event_name = GetEventName(browser_pid, false);
   logging_event_off_.reset(new base::WaitableEvent(
       CreateEvent(NULL, TRUE, FALSE, event_name.c_str())));
 
   RegisterWaitForEvent(true);
-#elif (!defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_POSIX))
-  if (getenv("CHROME_IPC_LOGGING"))
-    enabled_ = true;
-  SetLoggerFunctions(g_log_function_mapping);
 #endif
 
   MessageLoop::current()->AddDestructionObserver(this);
 }
 
 Logging::~Logging() {
 }
 
--- a/ipc/chromium/src/chrome/common/ipc_message.cc
+++ b/ipc/chromium/src/chrome/common/ipc_message.cc
@@ -22,72 +22,54 @@ Message::Message()
     : Pickle(sizeof(Header)) {
   header()->routing = header()->type = header()->flags = 0;
 #if defined(OS_POSIX)
   header()->num_fds = 0;
 #endif
   InitLoggingVariables();
 }
 
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-Message::Message(int32 routing_id, msgid_t type, PriorityValue priority)
-#else
 Message::Message(int32 routing_id, msgid_t type, PriorityValue priority,
                  const char* const name)
-#endif
     : Pickle(sizeof(Header)) {
   header()->routing = routing_id;
   header()->type = type;
   header()->flags = priority;
 #if defined(OS_POSIX)
   header()->num_fds = 0;
 #endif
-#if defined(CHROMIUM_MOZILLA_BUILD)
   header()->rpc_remote_stack_depth_guess = static_cast<uint32>(-1);
   header()->rpc_local_stack_depth = static_cast<uint32>(-1);
   header()->seqno = 0;
   InitLoggingVariables(name);
-#else
-  InitLoggingVariables();
-#endif
 }
 
 Message::Message(const char* data, int data_len) : Pickle(data, data_len) {
   InitLoggingVariables();
 }
 
 Message::Message(const Message& other) : Pickle(other) {
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  InitLoggingVariables();
-#else
   InitLoggingVariables(other.name_);
-#endif
 #if defined(OS_POSIX)
   file_descriptor_set_ = other.file_descriptor_set_;
 #endif
 }
 
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-void Message::InitLoggingVariables() {
-#else
 void Message::InitLoggingVariables(const char* const name) {
   name_ = name;
-#endif
 #ifdef IPC_MESSAGE_LOG_ENABLED
   received_time_ = 0;
   dont_log_ = false;
   log_data_ = NULL;
 #endif
 }
 
 Message& Message::operator=(const Message& other) {
   *static_cast<Pickle*>(this) = other;
-#if defined(CHROMIUM_MOZILLA_BUILD)
   InitLoggingVariables(other.name_);
-#endif
 #if defined(OS_POSIX)
   file_descriptor_set_ = other.file_descriptor_set_;
 #endif
   return *this;
 }
 
 #ifdef IPC_MESSAGE_LOG_ENABLED
 void Message::set_sent_time(int64 time) {
--- a/ipc/chromium/src/chrome/common/ipc_message.h
+++ b/ipc/chromium/src/chrome/common/ipc_message.h
@@ -13,19 +13,17 @@
 #ifndef NDEBUG
 #define IPC_MESSAGE_LOG_ENABLED
 #endif
 
 #if defined(OS_POSIX)
 #include "base/ref_counted.h"
 #endif
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
 #define IPC_MESSAGE_ENABLE_RPC
-#endif
 
 namespace base {
 class FileDescriptor;
 }
 
 class FileDescriptorSet;
 
 namespace IPC {
@@ -33,21 +31,17 @@ namespace IPC {
 //------------------------------------------------------------------------------
 
 class Channel;
 class Message;
 struct LogData;
 
 class Message : public Pickle {
  public:
-#if defined(CHROMIUM_MOZILLA_BUILD)
   typedef uint32 msgid_t;
-#else
-  typedef uint16 msgid_t;
-#endif
 
   // Implemented by objects that can send IPC messages across a channel.
   class Sender {
    public:
     virtual ~Sender() {}
 
     // Sends the given IPC message.  The implementor takes ownership of the
     // given Message regardless of whether or not this method succeeds.  This
@@ -63,22 +57,18 @@ class Message : public Pickle {
   };
 
   virtual ~Message();
 
   Message();
 
   // Initialize a message with a user-defined type, priority value, and
   // destination WebView ID.
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  Message(int32 routing_id, msgid_t type, PriorityValue priority);
-#else
   Message(int32 routing_id, msgid_t type, PriorityValue priority,
           const char* const name="???");
-#endif
 
   // Initializes a message from a const block of data.  The data is not copied;
   // instead the data is merely referenced by this message.  Only const methods
   // should be used on the message when initialized this way.
   Message(const char* data, int data_len);
 
   Message(const Message& other);
   Message& operator=(const Message& other);
@@ -146,17 +136,16 @@ class Message : public Pickle {
   int32 routing_id() const {
     return header()->routing;
   }
 
   void set_routing_id(int32 new_id) {
     header()->routing = new_id;
   }
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   uint32 rpc_remote_stack_depth_guess() const {
     return header()->rpc_remote_stack_depth_guess;
   }
 
   void set_rpc_remote_stack_depth_guess(uint32 depth) {
     DCHECK(is_rpc());
     header()->rpc_remote_stack_depth_guess = depth;
   }
@@ -180,17 +169,16 @@ class Message : public Pickle {
 
   const char* const name() const {
     return name_;
   }
 
   void set_name(const char* const name) {
     name_ = name;
   }
-#endif
 
   template<class T>
   static bool Dispatch(const Message* msg, T* obj, void (T::*func)()) {
     (obj->*func)();
     return true;
   }
 
   template<class T>
@@ -249,34 +237,31 @@ class Message : public Pickle {
   // reply message, so that when it's sent and we have the output parameters
   // we can log it.  As such, we set a flag on the sent message to not log it.
   void set_sync_log_data(LogData* data) const { log_data_ = data; }
   LogData* sync_log_data() const { return log_data_; }
   void set_dont_log() const { dont_log_ = true; }
   bool dont_log() const { return dont_log_; }
 #endif
 
-#if !defined(CHROMIUM_MOZILLA_BUILD)
- protected:
-#endif
   friend class Channel;
   friend class MessageReplyDeserializer;
   friend class SyncMessage;
 
   void set_sync() {
     header()->flags |= SYNC_BIT;
   }
 
 #if defined(IPC_MESSAGE_ENABLE_RPC)
   void set_rpc() {
     header()->flags |= RPC_BIT;
   }
 #endif
 
-#if defined(CHROMIUM_MOZILLA_BUILD) && !defined(OS_MACOSX)
+#if !defined(OS_MACOSX)
  protected:
 #endif
 
   // flags
   enum {
     PRIORITY_MASK   = 0x0003,
     SYNC_BIT        = 0x0004,
     REPLY_BIT       = 0x0008,
@@ -288,47 +273,37 @@ class Message : public Pickle {
     RPC_BIT        = 0x0100,
 #endif
   };
 
 #pragma pack(push, 2)
   struct Header : Pickle::Header {
     int32 routing;  // ID of the view that this message is destined for
     msgid_t type;   // specifies the user-defined message type
-#if defined(CHROMIUM_MOZILLA_BUILD)
     uint32 flags;   // specifies control flags for the message
-#else
-    uint16 flags;   // specifies control flags for the message
-#endif
 #if defined(OS_POSIX)
     uint32 num_fds; // the number of descriptors included with this message
 #endif
-#if defined(CHROMIUM_MOZILLA_BUILD)
     // For RPC messages, a guess at what the *other* side's stack depth is.
     uint32 rpc_remote_stack_depth_guess;
     // The actual local stack depth.
     uint32 rpc_local_stack_depth;
     // Sequence number
     int32 seqno;
-#endif
   };
 #pragma pack(pop)
 
   Header* header() {
     return headerT<Header>();
   }
   const Header* header() const {
     return headerT<Header>();
   }
 
-#if !defined(CHROMIUM_MOZILLA_BUILD)
-  void InitLoggingVariables();
-#else
   void InitLoggingVariables(const char* const name="???");
-#endif
 
 #if defined(OS_POSIX)
   // The set of file descriptors associated with this message.
   scoped_refptr<FileDescriptorSet> file_descriptor_set_;
 
   // Ensure that a FileDescriptorSet is allocated
   void EnsureFileDescriptorSet();
 
@@ -336,19 +311,17 @@ class Message : public Pickle {
     EnsureFileDescriptorSet();
     return file_descriptor_set_.get();
   }
   const FileDescriptorSet* file_descriptor_set() const {
     return file_descriptor_set_.get();
   }
 #endif
 
-#if defined(CHROMIUM_MOZILLA_BUILD)
   const char* name_;
-#endif
 
 #ifdef IPC_MESSAGE_LOG_ENABLED
   // Used for logging.
   mutable int64 received_time_;
   mutable std::wstring output_params_;
   mutable LogData* log_data_;
   mutable bool dont_log_;
 #endif
--- a/ipc/chromium/src/chrome/common/ipc_message_macros.h
+++ b/ipc/chromium/src/chrome/common/ipc_message_macros.h
@@ -35,22 +35,17 @@
 //
 // The handler function will look like:
 //     void OnSyncMessageName(const type1& in1, IPC::Message* reply_msg);
 //
 // Receiver stashes the IPC::Message* pointer, and when it's ready, it does:
 //     ViewHostMsg_SyncMessageName::WriteReplyParams(reply_msg, out1, out2);
 //     Send(reply_msg);
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "IPC/IPCMessageUtils.h"
-#else
 #include "chrome/common/ipc_message_utils.h"
-#endif
-
 
 #ifndef MESSAGES_INTERNAL_FILE
 #error This file should only be included by X_messages.h, which needs to define MESSAGES_INTERNAL_FILE first.
 #endif
 
 // Trick scons and xcode into seeing the possible real dependencies since they
 // don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828
 #if 0
--- a/ipc/chromium/src/chrome/common/ipc_message_utils.cc
+++ b/ipc/chromium/src/chrome/common/ipc_message_utils.cc
@@ -1,24 +1,18 @@
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "chrome/common/ipc_message_utils.h"
 
 #include "base/gfx/rect.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "googleurl/src/gurl.h"
-#endif
 #ifndef EXCLUDE_SKIA_DEPENDENCIES
 #include "SkBitmap.h"
 #endif
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "webkit/glue/dom_operations.h"
-#endif
 
 namespace IPC {
 
 #ifndef EXCLUDE_SKIA_DEPENDENCIES
 
 namespace {
 
 struct SkBitmap_Data {
@@ -95,137 +89,9 @@ bool ParamTraits<SkBitmap>::Read(const M
 }
 
 void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::wstring* l) {
   l->append(StringPrintf(L"<SkBitmap>"));
 }
 
 #endif  // EXCLUDE_SKIA_DEPENDENCIES
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-void ParamTraits<GURL>::Write(Message* m, const GURL& p) {
-  m->WriteString(p.possibly_invalid_spec());
-  // TODO(brettw) bug 684583: Add encoding for query params.
-}
-
-bool ParamTraits<GURL>::Read(const Message* m, void** iter, GURL* p) {
-  std::string s;
-  if (!m->ReadString(iter, &s)) {
-    *p = GURL();
-    return false;
-  }
-  *p = GURL(s);
-  return true;
-}
-
-void ParamTraits<GURL>::Log(const GURL& p, std::wstring* l) {
-  l->append(UTF8ToWide(p.spec()));
-}
-
-void ParamTraits<gfx::Point>::Write(Message* m, const gfx::Point& p) {
-  m->WriteInt(p.x());
-  m->WriteInt(p.y());
-}
-
-bool ParamTraits<gfx::Point>::Read(const Message* m, void** iter,
-                                   gfx::Point* r) {
-  int x, y;
-  if (!m->ReadInt(iter, &x) ||
-      !m->ReadInt(iter, &y))
-    return false;
-  r->set_x(x);
-  r->set_y(y);
-  return true;
-}
-
-void ParamTraits<gfx::Point>::Log(const gfx::Point& p, std::wstring* l) {
-  l->append(StringPrintf(L"(%d, %d)", p.x(), p.y()));
-}
-
-
-void ParamTraits<gfx::Rect>::Write(Message* m, const gfx::Rect& p) {
-  m->WriteInt(p.x());
-  m->WriteInt(p.y());
-  m->WriteInt(p.width());
-  m->WriteInt(p.height());
-}
-
-bool ParamTraits<gfx::Rect>::Read(const Message* m, void** iter, gfx::Rect* r) {
-  int x, y, w, h;
-  if (!m->ReadInt(iter, &x) ||
-      !m->ReadInt(iter, &y) ||
-      !m->ReadInt(iter, &w) ||
-      !m->ReadInt(iter, &h))
-    return false;
-  r->set_x(x);
-  r->set_y(y);
-  r->set_width(w);
-  r->set_height(h);
-  return true;
-}
-
-void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::wstring* l) {
-  l->append(StringPrintf(L"(%d, %d, %d, %d)", p.x(), p.y(),
-                         p.width(), p.height()));
-}
-
-
-void ParamTraits<gfx::Size>::Write(Message* m, const gfx::Size& p) {
-  m->WriteInt(p.width());
-  m->WriteInt(p.height());
-}
-
-bool ParamTraits<gfx::Size>::Read(const Message* m, void** iter, gfx::Size* r) {
-  int w, h;
-  if (!m->ReadInt(iter, &w) ||
-      !m->ReadInt(iter, &h))
-    return false;
-  r->set_width(w);
-  r->set_height(h);
-  return true;
-}
-
-void ParamTraits<gfx::Size>::Log(const gfx::Size& p, std::wstring* l) {
-  l->append(StringPrintf(L"(%d, %d)", p.width(), p.height()));
-}
-
-void ParamTraits<webkit_glue::WebApplicationInfo>::Write(
-    Message* m, const webkit_glue::WebApplicationInfo& p) {
-  WriteParam(m, p.title);
-  WriteParam(m, p.description);
-  WriteParam(m, p.app_url);
-  WriteParam(m, p.icons.size());
-  for (size_t i = 0; i < p.icons.size(); ++i) {
-    WriteParam(m, p.icons[i].url);
-    WriteParam(m, p.icons[i].width);
-    WriteParam(m, p.icons[i].height);
-  }
-}
-
-bool ParamTraits<webkit_glue::WebApplicationInfo>::Read(
-    const Message* m, void** iter, webkit_glue::WebApplicationInfo* r) {
-  size_t icon_count;
-  bool result =
-    ReadParam(m, iter, &r->title) &&
-    ReadParam(m, iter, &r->description) &&
-    ReadParam(m, iter, &r->app_url) &&
-    ReadParam(m, iter, &icon_count);
-  if (!result)
-    return false;
-  for (size_t i = 0; i < icon_count && result; ++i) {
-    param_type::IconInfo icon_info;
-    result =
-        ReadParam(m, iter, &icon_info.url) &&
-        ReadParam(m, iter, &icon_info.width) &&
-        ReadParam(m, iter, &icon_info.height);
-    r->icons.push_back(icon_info);
-  }
-  return result;
-}
-
-void ParamTraits<webkit_glue::WebApplicationInfo>::Log(
-    const webkit_glue::WebApplicationInfo& p, std::wstring* l) {
-  l->append(L"<WebApplicationInfo>");
-}
-
-#endif // CHROMIUM_MOZILLA_BUILD
-
 }  // namespace IPC
--- a/ipc/chromium/src/chrome/common/ipc_message_utils.h
+++ b/ipc/chromium/src/chrome/common/ipc_message_utils.h
@@ -15,66 +15,16 @@
 #include "base/tuple.h"
 
 #if defined(OS_POSIX)
 #include "chrome/common/file_descriptor_set_posix.h"
 #endif
 #include "chrome/common/ipc_sync_message.h"
 #include "chrome/common/thumbnail_score.h"
 #include "chrome/common/transport_dib.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "webkit/glue/webcursor.h"
-#include "webkit/glue/window_open_disposition.h"
-
-// Forward declarations.
-class GURL;
-class SkBitmap;
-
-namespace gfx {
-class Point;
-class Rect;
-class Size;
-}  // namespace gfx
-
-namespace webkit_glue {
-struct WebApplicationInfo;
-}  // namespace webkit_glue
-
-// Used by IPC_BEGIN_MESSAGES so that each message class starts from a unique
-// base.  Messages have unique IDs across channels in order for the IPC logging
-// code to figure out the message class from its ID.
-enum IPCMessageStart {
-  // By using a start value of 0 for automation messages, we keep backward
-  // compatibility with old builds.
-  AutomationMsgStart = 0,
-  ViewMsgStart,
-  ViewHostMsgStart,
-  PluginProcessMsgStart,
-  PluginProcessHostMsgStart,
-  PluginMsgStart,
-  PluginHostMsgStart,
-  NPObjectMsgStart,
-  TestMsgStart,
-  DevToolsAgentMsgStart,
-  DevToolsClientMsgStart,
-  WorkerProcessMsgStart,
-  WorkerProcessHostMsgStart,
-  WorkerMsgStart,
-  WorkerHostMsgStart,
-  // NOTE: When you add a new message class, also update
-  // IPCStatusView::IPCStatusView to ensure logging works.
-  // NOTE: this enum is used by IPC_MESSAGE_MACRO to generate a unique message
-  // id.  Only 4 bits are used for the message type, so if this enum needs more
-  // than 16 entries, that code needs to be updated.
-  LastMsgIndex
-};
-
-COMPILE_ASSERT(LastMsgIndex <= 16, need_to_update_IPC_MESSAGE_MACRO);
-
-#endif /* CHROMIUM_MOZILLA_BUILD */
 
 namespace IPC {
 
 //-----------------------------------------------------------------------------
 // An iterator class for reading the fields contained within a Message.
 
 class MessageIterator {
  public:
@@ -214,17 +164,17 @@ struct ParamTraits<unsigned long> {
   static bool Read(const Message* m, void** iter, param_type* r) {
     return m->ReadULong(iter, r);
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(StringPrintf(L"%ul", p));
   }
 };
 
-#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
+#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
 // There size_t is a synonym for |unsigned long| ...
 template <>
 struct ParamTraits<size_t> {
   typedef size_t param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteSize(p);
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
@@ -267,54 +217,46 @@ struct ParamTraits<uint32> {
     return m->ReadUInt32(iter, r);
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(StringPrintf(L"%u", p));
   }
 };
 #endif  // defined(OS_MACOSX)
 
-#if !(defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
+#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
 // int64 is |long int| on 64-bit systems, uint64 is |unsigned long|
 template <>
 struct ParamTraits<int64> {
   typedef int64 param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteInt64(p);
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
     return m->ReadInt64(iter, r);
   }
   static void Log(const param_type& p, std::wstring* l) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-    l->append(StringPrintf(L"%I64d", p));
-#else
     l->append(StringPrintf(L"%" PRId64L, p));
-#endif // ifndef CHROMIUM_MOZILLA_BUILD
   }
 };
 
 template <>
 struct ParamTraits<uint64> {
   typedef uint64 param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteInt64(static_cast<int64>(p));
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
     return m->ReadInt64(iter, reinterpret_cast<int64*>(r));
   }
   static void Log(const param_type& p, std::wstring* l) {
-#ifndef CHROMIUM_MOZILLA_BUILD
-    l->append(StringPrintf(L"%I64u", p));
-#else
     l->append(StringPrintf(L"%" PRIu64L, p));
-#endif // ifndef CHROMIUM_MOZILLA_BUILD
   }
 };
-#endif // if !(defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
+#endif // if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
 
 template <>
 struct ParamTraits<double> {
   typedef double param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteData(reinterpret_cast<const char*>(&p), sizeof(param_type));
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
@@ -330,42 +272,16 @@ struct ParamTraits<double> {
 
     return result;
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(StringPrintf(L"e", p));
   }
 };
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-template <>
-struct ParamTraits<wchar_t> {
-  typedef wchar_t param_type;
-  static void Write(Message* m, const param_type& p) {
-    m->WriteData(reinterpret_cast<const char*>(&p), sizeof(param_type));
-  }
-  static bool Read(const Message* m, void** iter, param_type* r) {
-    const char *data;
-    int data_size = 0;
-    bool result = m->ReadData(iter, &data, &data_size);
-    if (result && data_size == sizeof(param_type)) {
-      memcpy(r, data, sizeof(param_type));
-    } else {
-      result = false;
-      NOTREACHED();
-    }
-
-    return result;
-  }
-  static void Log(const param_type& p, std::wstring* l) {
-    l->append(StringPrintf(L"%lc", p));
-  }
-};
-#endif /* CHROMIUM_MOZILLA_BUILD */
-
 template <>
 struct ParamTraits<base::Time> {
   typedef base::Time param_type;
   static void Write(Message* m, const param_type& p) {
     ParamTraits<int64>::Write(m, p.ToInternalValue());
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
     int64 value;
@@ -421,30 +337,16 @@ struct ParamTraits<MSG> {
       NOTREACHED();
     }
 
     return result;
   }
 };
 #endif  // defined(OS_WIN)
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-template <>
-struct ParamTraits<SkBitmap> {
-  typedef SkBitmap param_type;
-  static void Write(Message* m, const param_type& p);
-
-  // Note: This function expects parameter |r| to be of type &SkBitmap since
-  // r->SetConfig() and r->SetPixels() are called.
-  static bool Read(const Message* m, void** iter, param_type* r);
-
-  static void Log(const param_type& p, std::wstring* l);
-};
-#endif /* CHROMIUM_MOZILLA_BUILD */
-
 template <>
 struct ParamTraits<std::string> {
   typedef std::string param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteString(p);
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
     return m->ReadString(iter, r);
@@ -604,26 +506,16 @@ struct ParamTraits<string16> {
     return m->ReadString16(iter, r);
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(UTF16ToWide(p));
   }
 };
 #endif
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-template <>
-struct ParamTraits<GURL> {
-  typedef GURL param_type;
-  static void Write(Message* m, const param_type& p);
-  static bool Read(const Message* m, void** iter, param_type* p);
-  static void Log(const param_type& p, std::wstring* l);
-};
-#endif /* CHROMIUM_MOZILLA_BUILD */
-
 // and, a few more useful types...
 #if defined(OS_WIN)
 template <>
 struct ParamTraits<HANDLE> {
   typedef HANDLE param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteIntPtr(reinterpret_cast<intptr_t>(p));
   }
@@ -712,42 +604,16 @@ struct ParamTraits<FilePath> {
     *r = FilePath(value);
     return true;
   }
   static void Log(const param_type& p, std::wstring* l) {
     ParamTraits<FilePath::StringType>::Log(p.value(), l);
   }
 };
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-template <>
-struct ParamTraits<gfx::Point> {
-  typedef gfx::Point param_type;
-  static void Write(Message* m, const param_type& p);
-  static bool Read(const Message* m, void** iter, param_type* r);
-  static void Log(const param_type& p, std::wstring* l);
-};
-
-template <>
-struct ParamTraits<gfx::Rect> {
-  typedef gfx::Rect param_type;
-  static void Write(Message* m, const param_type& p);
-  static bool Read(const Message* m, void** iter, param_type* r);
-  static void Log(const param_type& p, std::wstring* l);
-};
-
-template <>
-struct ParamTraits<gfx::Size> {
-  typedef gfx::Size param_type;
-  static void Write(Message* m, const param_type& p);
-  static bool Read(const Message* m, void** iter, param_type* r);
-  static void Log(const param_type& p, std::wstring* l);
-};
-#endif /* CHROMIUM_MOZILLA_BUILD */
-
 #if defined(OS_POSIX)
 // FileDescriptors may be serialised over IPC channels on POSIX. On the
 // receiving side, the FileDescriptor is a valid duplicate of the file
 // descriptor which was transmitted: *it is not just a copy of the integer like
 // HANDLEs on Windows*. The only exception is if the file descriptor is < 0. In
 // this case, the receiving end will see a value of -1. *Zero is a valid file
 // descriptor*.
 //
@@ -820,35 +686,16 @@ struct ParamTraits<ThumbnailScore> {
     return true;
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(StringPrintf(L"(%f, %d, %d)",
                            p.boring_score, p.good_clipping, p.at_top));
   }
 };
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-template <>
-struct ParamTraits<WindowOpenDisposition> {
-  typedef WindowOpenDisposition param_type;
-  static void Write(Message* m, const param_type& p) {
-    m->WriteInt(p);
-  }
-  static bool Read(const Message* m, void** iter, param_type* r) {
-    int temp;
-    bool res = m->ReadInt(iter, &temp);
-    *r = static_cast<WindowOpenDisposition>(temp);
-    return res;
-  }
-  static void Log(const param_type& p, std::wstring* l) {
-    l->append(StringPrintf(L"%d", p));
-  }
-};
-#endif
-
 #if defined(OS_WIN)
 template <>
 struct ParamTraits<XFORM> {
   typedef XFORM param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteData(reinterpret_cast<const char*>(&p), sizeof(XFORM));
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
@@ -865,32 +712,16 @@ struct ParamTraits<XFORM> {
     return result;
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(L"<XFORM>");
   }
 };
 #endif  // defined(OS_WIN)
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-template <>
-struct ParamTraits<WebCursor> {
-  typedef WebCursor param_type;
-  static void Write(Message* m, const param_type& p) {
-    p.Serialize(m);
-  }
-  static bool Read(const Message* m, void** iter, param_type* r) {
-    return r->Deserialize(m, iter);
-  }
-  static void Log(const param_type& p, std::wstring* l) {
-    l->append(L"<WebCursor>");
-  }
-};
-#endif
-
 struct LogData {
   std::wstring channel;
   int32 routing_id;
   uint16 type;
   std::wstring flags;
   int64 sent;  // Time that the message was sent (i.e. at Send()).
   int64 receive;  // Time before it was dispatched (i.e. before calling
                   // OnMessageReceived).
@@ -927,26 +758,16 @@ struct ParamTraits<LogData> {
     r->type = static_cast<uint16>(type);
     return result;
   }
   static void Log(const param_type& p, std::wstring* l) {
     // Doesn't make sense to implement this!
   }
 };
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-template <>
-struct ParamTraits<webkit_glue::WebApplicationInfo> {
-  typedef webkit_glue::WebApplicationInfo param_type;
-  static void Write(Message* m, const param_type& p);
-  static bool Read(const Message* m, void** iter, param_type* r);
-  static void Log(const param_type& p, std::wstring* l);
-};
-#endif /* CHROMIUM_MOZILLA_BUILD */
-
 #if defined(OS_WIN)
 template<>
 struct ParamTraits<TransportDIB::Id> {
   typedef TransportDIB::Id param_type;
   static void Write(Message* m, const param_type& p) {
     WriteParam(m, p.handle);
     WriteParam(m, p.sequence_num);
   }
--- a/ipc/chromium/src/chrome/common/message_router.cc
+++ b/ipc/chromium/src/chrome/common/message_router.cc
@@ -1,16 +1,13 @@
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "chrome/common/message_router.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "chrome/common/render_messages.h"
-#endif
 
 void MessageRouter::OnControlMessageReceived(const IPC::Message& msg) {
   NOTREACHED() <<
       "should override in subclass if you care about control messages";
 }
 
 bool MessageRouter::Send(IPC::Message* msg) {
   NOTREACHED() <<
--- a/ipc/chromium/src/chrome/common/platform_util_mac.mm
+++ b/ipc/chromium/src/chrome/common/platform_util_mac.mm
@@ -1,56 +1,35 @@
 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "chrome/common/platform_util.h"
 
 #import <Cocoa/Cocoa.h>
 
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "app/l10n_util.h"
-#endif
 #include "base/file_path.h"
 #include "base/logging.h"
 #include "base/sys_string_conversions.h"
-#ifndef CHROMIUM_MOZILLA_BUILD
-#include "chrome/browser/cocoa/tab_window_controller.h"
-#include "grit/generated_resources.h"
-#endif
 
 namespace platform_util {
 
 void ShowItemInFolder(const FilePath& full_path) {
   NSString* path_string = base::SysUTF8ToNSString(full_path.value());
   [[NSWorkspace sharedWorkspace] selectFile:path_string
                    inFileViewerRootedAtPath:nil];
 }
 
 gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
   return [view window];
 }
 
 string16 GetWindowTitle(gfx::NativeWindow window) {
-#ifdef CHROMIUM_MOZILLA_BUILD
   std::string str("Untitled");
   return string16(str.begin(), str.end());
-#else
-  NSString* title = nil;
-  if ([[window delegate] isKindOfClass:[TabWindowController class]])
-    title = [[window delegate] selectedTabTitle];
-  else
-    title = [window title];
-  // If we don't yet have a title, use "Untitled".
-  if (![title length])
-    return WideToUTF16(l10n_util::GetString(
-        IDS_BROWSER_WINDOW_MAC_TAB_UNTITLED));
-
-  return base::SysNSStringToUTF16(title);
-#endif
 }
 
 bool IsWindowActive(gfx::NativeWindow window) {
   NOTIMPLEMENTED();
   return false;
 }
 
 }  // namespace platform_util
--- a/ipc/chromium/src/chrome/common/process_watcher.h
+++ b/ipc/chromium/src/chrome/common/process_watcher.h
@@ -19,19 +19,17 @@ class ProcessWatcher {
   // aggressive about ensuring that the process terminates.
   //
   // This method does not block the calling thread.
   //
   // NOTE: The process handle must have been opened with the PROCESS_TERMINATE
   // and SYNCHRONIZE permissions.
   //
   static void EnsureProcessTerminated(base::ProcessHandle process_handle
-#if defined(CHROMIUM_MOZILLA_BUILD)
                                       , bool force=true
-#endif
   );
 
  private:
   // Do not instantiate this class.
   ProcessWatcher();
 
   DISALLOW_COPY_AND_ASSIGN(ProcessWatcher);
 };
--- a/ipc/chromium/src/chrome/common/process_watcher_win.cc
+++ b/ipc/chromium/src/chrome/common/process_watcher_win.cc
@@ -74,29 +74,25 @@ class TimerExpiredTask : public Task, pu
 
   DISALLOW_EVIL_CONSTRUCTORS(TimerExpiredTask);
 };
 
 }  // namespace
 
 // static
 void ProcessWatcher::EnsureProcessTerminated(base::ProcessHandle process
-#ifdef CHROMIUM_MOZILLA_BUILD
 					     , bool force
-#endif
 ) {
   DCHECK(process != GetCurrentProcess());
 
-#ifdef CHROMIUM_MOZILLA_BUILD
   if (!force) {
     WaitForSingleObject(process, INFINITE);
     CloseHandle(process);
     return;
   }
-#endif
 
   // If already signaled, then we are done!
   if (WaitForSingleObject(process, 0) == WAIT_OBJECT_0) {
     CloseHandle(process);
     return;
   }
 
   MessageLoop::current()->PostDelayedTask(FROM_HERE,
--- a/ipc/chromium/src/chrome/common/transport_dib_mac.cc
+++ b/ipc/chromium/src/chrome/common/transport_dib_mac.cc
@@ -20,21 +20,17 @@ TransportDIB::TransportDIB(TransportDIB:
 }
 
 TransportDIB::~TransportDIB() {
 }
 
 // static
 TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) {
   TransportDIB* dib = new TransportDIB;
-#ifdef CHROMIUM_MOZILLA_BUILD
   if (!dib->shared_memory_.Create("", false /* read write */,
-#else
-  if (!dib->shared_memory_.Create(L"", false /* read write */,
-#endif
                                   false /* do not open existing */, size)) {
     delete dib;
     return NULL;
   }
 
   dib->size_ = size;
   return dib;
 }
--- a/ipc/chromium/src/chrome/common/transport_dib_win.cc
+++ b/ipc/chromium/src/chrome/common/transport_dib_win.cc
@@ -22,21 +22,17 @@ TransportDIB::TransportDIB(HANDLE handle
 // static
 TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) {
   size_t allocation_granularity = base::SysInfo::VMAllocationGranularity();
   size = size / allocation_granularity + 1;
   size = size * allocation_granularity;
 
   TransportDIB* dib = new TransportDIB;
 
-#ifdef CHROMIUM_MOZILLA_BUILD
   if (!dib->shared_memory_.Create("", false /* read write */,
-#else
-  if (!dib->shared_memory_.Create(L"", false /* read write */,
-#endif
                                   true /* open existing */, size)) {
     delete dib;
     return NULL;
   }
 
   dib->size_ = size;
   dib->sequence_num_ = sequence_num;