Fixes a build error when disabling trace (which is done when building with chrome flag is set).
Review URL: http://webrtc-codereview.appspot.com/318006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1155 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
c6b286fc04
commit
2f47b5a70f
@ -84,6 +84,7 @@
|
|||||||
'thread_windows.h',
|
'thread_windows.h',
|
||||||
'thread_windows_set_name.h',
|
'thread_windows_set_name.h',
|
||||||
'trace_impl.cc',
|
'trace_impl.cc',
|
||||||
|
'trace_impl_no_op.cc',
|
||||||
'trace_impl.h',
|
'trace_impl.h',
|
||||||
'trace_posix.h',
|
'trace_posix.h',
|
||||||
'trace_windows.h',
|
'trace_windows.h',
|
||||||
@ -147,10 +148,12 @@
|
|||||||
['build_with_chromium==1', {
|
['build_with_chromium==1', {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'cpu.cc',
|
'cpu.cc',
|
||||||
|
'trace_impl.cc',
|
||||||
],
|
],
|
||||||
}, {
|
}, {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'cpu_dummy.cc',
|
'cpu_dummy.cc',
|
||||||
|
'trace_impl_no_op.cc',
|
||||||
],
|
],
|
||||||
}]
|
}]
|
||||||
] # conditions
|
] # conditions
|
||||||
|
@ -33,20 +33,6 @@
|
|||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
static WebRtc_UWord32 levelFilter = kTraceDefault;
|
static WebRtc_UWord32 levelFilter = kTraceDefault;
|
||||||
|
|
||||||
#ifdef WEBRTC_NO_TRACE
|
|
||||||
class TraceNoop : public Trace
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
TraceNoop()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~TraceNoop()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Construct On First Use idiom. Avoids "static initialization order fiasco".
|
// Construct On First Use idiom. Avoids "static initialization order fiasco".
|
||||||
TraceImpl* TraceImpl::StaticInstance(CountOperation count_operation,
|
TraceImpl* TraceImpl::StaticInstance(CountOperation count_operation,
|
||||||
const TraceLevel level)
|
const TraceLevel level)
|
||||||
@ -74,9 +60,7 @@ TraceImpl* TraceImpl::GetTrace(const TraceLevel level)
|
|||||||
|
|
||||||
TraceImpl* TraceImpl::CreateInstance()
|
TraceImpl* TraceImpl::CreateInstance()
|
||||||
{
|
{
|
||||||
#ifdef WEBRTC_NO_TRACE
|
#if defined(_WIN32)
|
||||||
return new TraceNoop();
|
|
||||||
#elif defined(_WIN32)
|
|
||||||
return new TraceWindows();
|
return new TraceWindows();
|
||||||
#else
|
#else
|
||||||
return new TracePosix();
|
return new TracePosix();
|
||||||
@ -754,8 +738,6 @@ bool TraceImpl::CreateFileName(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WEBRTC_NO_TRACE
|
|
||||||
|
|
||||||
void Trace::CreateTrace()
|
void Trace::CreateTrace()
|
||||||
{
|
{
|
||||||
TraceImpl::StaticInstance(kAddRef);
|
TraceImpl::StaticInstance(kAddRef);
|
||||||
@ -843,45 +825,5 @@ void Trace::Add(const TraceLevel level, const TraceModule module,
|
|||||||
ReturnTrace();
|
ReturnTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
void Trace::CreateTrace()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Trace::ReturnTrace()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
WebRtc_Word32 Trace::SetLevelFilter(WebRtc_UWord32 filter)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
WebRtc_Word32 Trace::LevelFilter(WebRtc_UWord32& filter)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
WebRtc_Word32 Trace::TraceFile(WebRtc_Word8 fileName[FileWrapper::kMaxFileNameSize])
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
WebRtc_Word32 Trace::SetTraceFile(const WebRtc_Word8* fileName,
|
|
||||||
const bool addFileCounter)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
WebRtc_Word32 Trace::SetTraceCallback(TraceCallback* callback)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Trace::Add(const TraceLevel level, const TraceModule module,
|
|
||||||
const WebRtc_Word32 id, const char* msg, ...)
|
|
||||||
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
56
src/system_wrappers/source/trace_impl_no_op.cc
Normal file
56
src/system_wrappers/source/trace_impl_no_op.cc
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
void Trace::CreateTrace()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Trace::ReturnTrace()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
WebRtc_Word32 Trace::SetLevelFilter(WebRtc_UWord32 /*filter*/)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
WebRtc_Word32 Trace::LevelFilter(WebRtc_UWord32& /*filter*/)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
WebRtc_Word32 Trace::TraceFile(
|
||||||
|
WebRtc_Word8 /*fileName*/[1024])
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
WebRtc_Word32 Trace::SetTraceFile(const WebRtc_Word8* /*fileName*/,
|
||||||
|
const bool /*addFileCounter*/)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
WebRtc_Word32 Trace::SetTraceCallback(TraceCallback* /*callback*/)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Trace::Add(const TraceLevel /*level*/, const TraceModule /*module*/,
|
||||||
|
const WebRtc_Word32 /*id*/, const char* /*msg*/, ...)
|
||||||
|
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace webrtc
|
Loading…
x
Reference in New Issue
Block a user