Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
Bug 680864 - Remove CHROMIUM_MOZILLA_BUILD ifdefs, since always defin…
Browse files Browse the repository at this point in the history
…ed and #ifndef codepaths broken anyway; r=cjones
  • Loading branch information
Ed Morley committed Aug 23, 2011
1 parent 6818d19 commit be9af63
Show file tree
Hide file tree
Showing 58 changed files with 22 additions and 2,494 deletions.
1 change: 0 additions & 1 deletion ipc/chromium/chromium-config.mk
Expand Up @@ -48,7 +48,6 @@ EXTRA_DEPS += $(topsrcdir)/ipc/chromium/chromium-config.mk

DEFINES += \
-DEXCLUDE_SKIA_DEPENDENCIES \
-DCHROMIUM_MOZILLA_BUILD \
$(NULL)

LOCAL_INCLUDES += \
Expand Down
2 changes: 0 additions & 2 deletions ipc/chromium/src/base/at_exit.cc
Expand Up @@ -64,11 +64,9 @@ void AtExitManager::ProcessCallbacksNow() {
}
}

#ifdef CHROMIUM_MOZILLA_BUILD
// static
bool AtExitManager::AlreadyRegistered() {
return !!g_top_manager;
}
#endif

} // namespace base
2 changes: 0 additions & 2 deletions ipc/chromium/src/base/at_exit.h
Expand Up @@ -51,9 +51,7 @@ class AtExitManager {
// is possible to register new callbacks after calling this function.
static void ProcessCallbacksNow();

#ifdef CHROMIUM_MOZILLA_BUILD
static bool AlreadyRegistered();
#endif

private:
struct CallbackAndParam {
Expand Down
2 changes: 0 additions & 2 deletions ipc/chromium/src/base/atomicops_internals_x86_gcc.h
Expand Up @@ -196,7 +196,6 @@ 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) {
Expand All @@ -207,7 +206,6 @@ inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
}
return x;
}
#endif

inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
*ptr = value;
Expand Down
2 changes: 1 addition & 1 deletion ipc/chromium/src/base/base_switches.h
Expand Up @@ -7,7 +7,7 @@
#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

Expand Down
10 changes: 2 additions & 8 deletions ipc/chromium/src/base/basictypes.h
Expand Up @@ -5,8 +5,6 @@
#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.
Expand Down Expand Up @@ -41,8 +39,6 @@
#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
Expand All @@ -63,7 +59,7 @@ typedef short int16;
#define _INT32
typedef int int32;
#endif
#if !(defined(CHROMIUM_MOZILLA_BUILD) && defined(PROTYPES_H))
#ifndef PROTYPES_H
typedef long long int64;
#endif

Expand All @@ -81,7 +77,7 @@ typedef unsigned short uint16;
#define _UINT32
typedef unsigned int uint32;
#endif
#if !(defined(CHROMIUM_MOZILLA_BUILD) && defined(PROTYPES_H))
#ifndef PROTYPES_H
typedef unsigned long long uint64;
#endif

Expand All @@ -104,7 +100,6 @@ 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
Expand All @@ -120,7 +115,6 @@ const int64 kint64max = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
# 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
Expand Down
2 changes: 0 additions & 2 deletions ipc/chromium/src/base/command_line.h
Expand Up @@ -65,11 +65,9 @@ class 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.)
Expand Down
20 changes: 0 additions & 20 deletions ipc/chromium/src/base/debug_util_posix.cc
Expand Up @@ -144,25 +144,5 @@ void StackTrace::PrintBacktrace() {
}

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
}
2 changes: 0 additions & 2 deletions ipc/chromium/src/base/histogram.cc
Expand Up @@ -21,13 +21,11 @@

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,
Expand Down
4 changes: 0 additions & 4 deletions ipc/chromium/src/base/histogram.h
Expand Up @@ -45,11 +45,7 @@
#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"
Expand Down
2 changes: 0 additions & 2 deletions ipc/chromium/src/base/id_map.h
Expand Up @@ -72,7 +72,6 @@ class IDMap {
return data_.empty();
}

#if defined(CHROMIUM_MOZILLA_BUILD)
void Clear() {
data_.clear();
}
Expand All @@ -84,7 +83,6 @@ class IDMap {
return true;
return false;
}
#endif

T* Lookup(int32 id) const {
const_iterator i = data_.find(id);
Expand Down

0 comments on commit be9af63

Please sign in to comment.