diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-18 20:21:31 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-18 20:21:31 +0000 |
commit | b104b50ddb1d70d95ff9ace7a6fb30ec3b1aeb17 (patch) | |
tree | 0d35c3f624aec7c6de8824fab2b9521bfff1dbff /remoting | |
parent | d13509f32546e26332733ac6153d359fbd566eaa (diff) | |
download | chromium_src-b104b50ddb1d70d95ff9ace7a6fb30ec3b1aeb17.zip chromium_src-b104b50ddb1d70d95ff9ace7a6fb30ec3b1aeb17.tar.gz chromium_src-b104b50ddb1d70d95ff9ace7a6fb30ec3b1aeb17.tar.bz2 |
FBTF: Monster ctor patch after changing heuristics in clang plugin.
(Only 916k this time off Debug Linux .a files)
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3814013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/base/encoder_zlib.cc | 2 | ||||
-rw-r--r-- | remoting/base/encoder_zlib.h | 2 | ||||
-rw-r--r-- | remoting/base/tracer.cc | 41 | ||||
-rw-r--r-- | remoting/base/tracer.h | 35 | ||||
-rw-r--r-- | remoting/host/client_connection.cc | 2 | ||||
-rw-r--r-- | remoting/host/client_connection.h | 2 | ||||
-rw-r--r-- | remoting/host/differ.cc | 2 | ||||
-rw-r--r-- | remoting/host/differ.h | 1 | ||||
-rw-r--r-- | remoting/host/in_memory_host_config.cc | 2 | ||||
-rw-r--r-- | remoting/host/in_memory_host_config.h | 2 | ||||
-rw-r--r-- | remoting/host/json_host_config.cc | 2 | ||||
-rw-r--r-- | remoting/host/json_host_config.h | 1 | ||||
-rw-r--r-- | remoting/protocol/messages_decoder.cc | 8 | ||||
-rw-r--r-- | remoting/protocol/messages_decoder.h | 11 | ||||
-rw-r--r-- | remoting/protocol/stream_reader.cc | 1 |
15 files changed, 80 insertions, 34 deletions
diff --git a/remoting/base/encoder_zlib.cc b/remoting/base/encoder_zlib.cc index 575d1f1..a36b8df 100644 --- a/remoting/base/encoder_zlib.cc +++ b/remoting/base/encoder_zlib.cc @@ -21,6 +21,8 @@ EncoderZlib::EncoderZlib() : packet_size_(kPacketSize) { EncoderZlib::EncoderZlib(int packet_size) : packet_size_(packet_size) { } +EncoderZlib::~EncoderZlib() {} + void EncoderZlib::Encode(scoped_refptr<CaptureData> capture_data, bool key_frame, DataAvailableCallback* data_available_callback) { diff --git a/remoting/base/encoder_zlib.h b/remoting/base/encoder_zlib.h index 6ed83650..3d0a13e 100644 --- a/remoting/base/encoder_zlib.h +++ b/remoting/base/encoder_zlib.h @@ -20,7 +20,7 @@ class EncoderZlib : public Encoder { EncoderZlib(); EncoderZlib(int packet_size); - virtual ~EncoderZlib() {} + virtual ~EncoderZlib(); virtual void Encode(scoped_refptr<CaptureData> capture_data, bool key_frame, diff --git a/remoting/base/tracer.cc b/remoting/base/tracer.cc index c9df2f0..29b2b62 100644 --- a/remoting/base/tracer.cc +++ b/remoting/base/tracer.cc @@ -13,6 +13,7 @@ #include "base/ref_counted.h" #include "base/stl_util-inl.h" #include "base/thread.h" +#include "base/thread_local.h" #include "base/time.h" namespace remoting { @@ -139,6 +140,46 @@ Tracer::~Tracer() { } } +// static +Tracer* TraceContext::tracer() { + return Get()->GetTracerInternal(); +} + +// static +void TraceContext::PushTracer(Tracer* tracer) { + Get()->PushTracerInternal(tracer); +} + +// static +void TraceContext::PopTracer() { + Get()->PopTracerInternal(); +} + +// static +TraceContext* TraceContext::Get() { + TraceContext* context = + Singleton<base::ThreadLocalPointer<TraceContext> >::get()->Get(); + if (context == NULL) { + context = new TraceContext(); + context->PushTracerInternal(new Tracer("default", 0.0)); + Singleton<base::ThreadLocalPointer<TraceContext> >::get()->Set(context); + } + return context; +} + +TraceContext::TraceContext() {} + +TraceContext::~TraceContext() {} + +void TraceContext::PushTracerInternal(Tracer* tracer) { + tracers_.push_back(tracer); +} + +void TraceContext::PopTracerInternal() { tracers_.pop_back(); } + +Tracer* TraceContext::GetTracerInternal() { return tracers_.back(); } + + } // namespace remoting DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::OutputLogger); diff --git a/remoting/base/tracer.h b/remoting/base/tracer.h index 4333f25..95d4e9c 100644 --- a/remoting/base/tracer.h +++ b/remoting/base/tracer.h @@ -58,7 +58,6 @@ #include "base/singleton.h" #include "base/task.h" #include "base/scoped_ptr.h" -#include "base/thread_local.h" #include "remoting/proto/trace.pb.h" namespace remoting { @@ -92,40 +91,24 @@ class Tracer : public base::RefCountedThreadSafe<Tracer> { class TraceContext { public: // Get the current tracer. - static Tracer* tracer() { - return Get()->GetTracerInternal(); - } + static Tracer* tracer(); - static void PushTracer(Tracer* tracer) { - Get()->PushTracerInternal(tracer); - } + static void PushTracer(Tracer* tracer); - static void PopTracer() { - Get()->PopTracerInternal(); - } + static void PopTracer(); - static TraceContext* Get() { - TraceContext* context = - Singleton<base::ThreadLocalPointer<TraceContext> >::get()->Get(); - if (context == NULL) { - context = new TraceContext(); - context->PushTracerInternal(new Tracer("default", 0.0)); - Singleton<base::ThreadLocalPointer<TraceContext> >::get()->Set(context); - } - return context; - } + static TraceContext* Get(); private: - TraceContext() { - } + TraceContext(); - ~TraceContext() {} + ~TraceContext(); - void PushTracerInternal(Tracer* tracer) { tracers_.push_back(tracer); } + void PushTracerInternal(Tracer* tracer); - void PopTracerInternal() { tracers_.pop_back(); } + void PopTracerInternal(); - Tracer* GetTracerInternal() { return tracers_.back(); } + Tracer* GetTracerInternal(); std::vector<scoped_refptr<Tracer> > tracers_; diff --git a/remoting/host/client_connection.cc b/remoting/host/client_connection.cc index 8c8bc94..57554f4 100644 --- a/remoting/host/client_connection.cc +++ b/remoting/host/client_connection.cc @@ -76,6 +76,8 @@ void ClientConnection::Disconnect() { } } +ClientConnection::ClientConnection() {} + void ClientConnection::OnConnectionStateChange( ChromotingConnection::State state) { if (state == ChromotingConnection::CONNECTED) { diff --git a/remoting/host/client_connection.h b/remoting/host/client_connection.h index 6eb6b0d..daac392 100644 --- a/remoting/host/client_connection.h +++ b/remoting/host/client_connection.h @@ -87,7 +87,7 @@ class ClientConnection : public base::RefCountedThreadSafe<ClientConnection> { protected: // Protected constructor used by unit test. - ClientConnection() {} + ClientConnection(); private: // Callback for ChromotingConnection. diff --git a/remoting/host/differ.cc b/remoting/host/differ.cc index 3409e0f..c7d28b0 100644 --- a/remoting/host/differ.cc +++ b/remoting/host/differ.cc @@ -23,6 +23,8 @@ Differ::Differ(int width, int height, int bpp, int stride) { diff_info_.reset(new uint8[diff_info_size_]); } +Differ::~Differ() {} + void Differ::CalcDirtyRects(const void* prev_buffer, const void* curr_buffer, InvalidRects* rects) { if (!rects) { diff --git a/remoting/host/differ.h b/remoting/host/differ.h index 1476cdb..ce76572 100644 --- a/remoting/host/differ.h +++ b/remoting/host/differ.h @@ -25,6 +25,7 @@ class Differ { // Create a differ that operates on bitmaps with the specified width, height // and bytes_per_pixel. Differ(int width, int height, int bytes_per_pixel, int stride); + ~Differ(); // Given the previous and current screen buffer, calculate the set of // rectangles that enclose all the changed pixels in the new screen. diff --git a/remoting/host/in_memory_host_config.cc b/remoting/host/in_memory_host_config.cc index 2450638..e0cf120 100644 --- a/remoting/host/in_memory_host_config.cc +++ b/remoting/host/in_memory_host_config.cc @@ -13,6 +13,8 @@ InMemoryHostConfig::InMemoryHostConfig() : values_(new DictionaryValue()) { } +InMemoryHostConfig::~InMemoryHostConfig() {} + bool InMemoryHostConfig::GetString(const std::string& path, std::string* out_value) { AutoLock auto_lock(lock_); diff --git a/remoting/host/in_memory_host_config.h b/remoting/host/in_memory_host_config.h index 6a44e39..511998d 100644 --- a/remoting/host/in_memory_host_config.h +++ b/remoting/host/in_memory_host_config.h @@ -7,7 +7,6 @@ #include <string> -#include "base/file_path.h" #include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" @@ -22,6 +21,7 @@ namespace remoting { class InMemoryHostConfig : public MutableHostConfig { public: InMemoryHostConfig(); + virtual ~InMemoryHostConfig(); // MutableHostConfig interface. virtual bool GetString(const std::string& path, std::string* out_value); diff --git a/remoting/host/json_host_config.cc b/remoting/host/json_host_config.cc index 897402c..f97b343 100644 --- a/remoting/host/json_host_config.cc +++ b/remoting/host/json_host_config.cc @@ -21,6 +21,8 @@ JsonHostConfig::JsonHostConfig( message_loop_proxy_(file_message_loop_proxy) { } +JsonHostConfig::~JsonHostConfig() {} + bool JsonHostConfig::Read() { // TODO(sergeyu): Implement better error handling here. std::string file_content; diff --git a/remoting/host/json_host_config.h b/remoting/host/json_host_config.h index b136cdf..dc892e9 100644 --- a/remoting/host/json_host_config.h +++ b/remoting/host/json_host_config.h @@ -27,6 +27,7 @@ class JsonHostConfig : public MutableHostConfig { public: JsonHostConfig(const FilePath& pref_filename, base::MessageLoopProxy* file_message_loop_proxy); + virtual ~JsonHostConfig(); virtual bool Read(); diff --git a/remoting/protocol/messages_decoder.cc b/remoting/protocol/messages_decoder.cc index f7c7439..73e9ea4 100644 --- a/remoting/protocol/messages_decoder.cc +++ b/remoting/protocol/messages_decoder.cc @@ -5,6 +5,7 @@ #include "remoting/protocol/messages_decoder.h" #include "base/logging.h" +#include "net/base/io_buffer.h" #include "remoting/base/multiple_array_input_stream.h" #include "talk/base/byteorder.h" @@ -31,6 +32,13 @@ void MessagesDecoder::ParseHostMessages(scoped_refptr<net::IOBuffer> data, ParseMessages<ChromotingHostMessage>(data, data_size, messages); } +MessagesDecoder::DataChunk::DataChunk(net::IOBuffer* data, size_t data_size) + : data(data), + data_size(data_size) { +} + +MessagesDecoder::DataChunk::~DataChunk() {} + template <typename T> void MessagesDecoder::ParseMessages(scoped_refptr<net::IOBuffer> data, int data_size, diff --git a/remoting/protocol/messages_decoder.h b/remoting/protocol/messages_decoder.h index ea1b2c5..b22f6ba 100644 --- a/remoting/protocol/messages_decoder.h +++ b/remoting/protocol/messages_decoder.h @@ -10,9 +10,12 @@ #include "base/ref_counted.h" #include "google/protobuf/message_lite.h" -#include "net/base/io_buffer.h" #include "remoting/proto/internal.pb.h" +namespace net { +class IOBuffer; +} + namespace remoting { typedef std::list<ChromotingHostMessage*> HostMessageList; @@ -42,10 +45,8 @@ class MessagesDecoder { // DataChunk stores reference to a net::IOBuffer and size of the data // stored in that buffer. struct DataChunk { - DataChunk(net::IOBuffer* data, size_t data_size) - : data(data), - data_size(data_size) { - } + DataChunk(net::IOBuffer* data, size_t data_size); + ~DataChunk(); scoped_refptr<net::IOBuffer> data; size_t data_size; diff --git a/remoting/protocol/stream_reader.cc b/remoting/protocol/stream_reader.cc index bfceb3e..63786e4 100644 --- a/remoting/protocol/stream_reader.cc +++ b/remoting/protocol/stream_reader.cc @@ -5,6 +5,7 @@ #include "remoting/protocol/stream_reader.h" #include "base/message_loop.h" +#include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/socket/socket.h" #include "remoting/protocol/chromoting_connection.h" |