Skip to content

Commit

Permalink
FBTF: Monster ctor patch after changing heuristics in clang plugin.
Browse files Browse the repository at this point in the history
(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
  • Loading branch information
erg@google.com committed Oct 18, 2010
1 parent d13509f commit b104b50
Show file tree
Hide file tree
Showing 85 changed files with 498 additions and 182 deletions.
2 changes: 2 additions & 0 deletions app/multi_animation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ MultiAnimation::MultiAnimation(const Parts& parts)
DCHECK(!parts_.empty());
}

MultiAnimation::~MultiAnimation() {}

void MultiAnimation::Step(base::TimeTicks time_now) {
double last_value = current_value_;
size_t last_index = current_part_index_;
Expand Down
1 change: 1 addition & 0 deletions app/multi_animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class MultiAnimation : public Animation {
typedef std::vector<Part> Parts;

explicit MultiAnimation(const Parts& parts);
virtual ~MultiAnimation();

// Returns the current value. The current value for a MultiAnimation is
// determined from the tween type of the current part.
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/appcache/appcache_dispatcher_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ AppCacheDispatcherHost::AppCacheDispatcherHost(
DCHECK(request_context_getter_.get());
}

AppCacheDispatcherHost::~AppCacheDispatcherHost() {}

void AppCacheDispatcherHost::Initialize(
ResourceDispatcherHost::Receiver* receiver) {
DCHECK(receiver && !receiver_);
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/appcache/appcache_dispatcher_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class AppCacheDispatcherHost {
explicit AppCacheDispatcherHost(
URLRequestContextGetter* request_context_getter);

~AppCacheDispatcherHost();

void Initialize(ResourceDispatcherHost::Receiver* receiver);
bool OnMessageReceived(const IPC::Message& msg, bool* msg_is_ok);

Expand Down
1 change: 1 addition & 0 deletions chrome/browser/debugger/devtools_netlog_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "chrome/common/resource_response.h"
#include "net/base/load_flags.h"
#include "net/http/http_net_log_params.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_netlog_params.h"
#include "webkit/glue/resource_loader_bridge.h"
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/file_system/file_system_host_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ void FileSystemHostContext::ResetOriginQuotaUnlimited(const GURL& url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
quota_manager_->ResetOriginQuotaUnlimited(url);
}

FileSystemHostContext::~FileSystemHostContext() {}
1 change: 1 addition & 0 deletions chrome/browser/file_system/file_system_host_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class FileSystemHostContext
BrowserThread::DeleteOnIOThread> {
public:
FileSystemHostContext(const FilePath& data_path, bool is_incognito);
virtual ~FileSystemHostContext();

// Quota related methods.
bool CheckOriginQuota(const GURL& url, int64 growth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ using std::string;

namespace sync_api {

SyncAPIBridgedPost::SyncAPIBridgedPost(
browser_sync::ServerConnectionManager* scm,
HttpPostProviderFactory* factory)
: Post(scm), factory_(factory) {
}

SyncAPIBridgedPost::~SyncAPIBridgedPost() {}


bool SyncAPIBridgedPost::Init(const char* path, const string& auth_token,
const string& payload, HttpResponse* response) {
string sync_server;
Expand Down Expand Up @@ -67,6 +76,23 @@ bool SyncAPIBridgedPost::Init(const char* path, const string& auth_token,
return true;
}

SyncAPIServerConnectionManager::SyncAPIServerConnectionManager(
const std::string& server,
int port,
bool use_ssl,
const std::string& client_version,
HttpPostProviderFactory* factory)
: ServerConnectionManager(server, port, use_ssl, client_version),
post_provider_factory_(factory) {
DCHECK(post_provider_factory_.get());
}

SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {}

browser_sync::ServerConnectionManager::Post*
SyncAPIServerConnectionManager::MakePost() {
return new SyncAPIBridgedPost(this, post_provider_factory_.get());
}


} // namespace sync_api
19 changes: 6 additions & 13 deletions chrome/browser/sync/engine/net/syncapi_server_connection_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ class SyncAPIBridgedPost
: public browser_sync::ServerConnectionManager::Post {
public:
SyncAPIBridgedPost(browser_sync::ServerConnectionManager* scm,
HttpPostProviderFactory* factory)
: Post(scm), factory_(factory) {
}
HttpPostProviderFactory* factory);

virtual ~SyncAPIBridgedPost() { }
virtual ~SyncAPIBridgedPost();

virtual bool Init(const char* path,
const std::string& auth_token,
Expand All @@ -51,17 +49,12 @@ class SyncAPIServerConnectionManager
int port,
bool use_ssl,
const std::string& client_version,
HttpPostProviderFactory* factory)
: ServerConnectionManager(server, port, use_ssl, client_version),
post_provider_factory_(factory) {
DCHECK(post_provider_factory_.get());
}

HttpPostProviderFactory* factory);
virtual ~SyncAPIServerConnectionManager();

protected:
virtual Post* MakePost() {
return new SyncAPIBridgedPost(this, post_provider_factory_.get());
}
virtual Post* MakePost();

private:
// A factory creating concrete HttpPostProviders for use whenever we need to
// issue a POST to sync servers.
Expand Down
12 changes: 12 additions & 0 deletions chrome/browser/sync/engine/syncapi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,18 @@ class BridgedGaiaAuthenticator : public gaia::GaiaAuthenticator {
DISALLOW_COPY_AND_ASSIGN(BridgedGaiaAuthenticator);
};

SyncManager::ChangeRecord::ChangeRecord()
: id(kInvalidId), action(ACTION_ADD) {}

SyncManager::ChangeRecord::~ChangeRecord() {}

SyncManager::ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData(
const sync_pb::PasswordSpecificsData& data)
: unencrypted_(data) {
}

SyncManager::ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {}

//////////////////////////////////////////////////////////////////////////
// SyncManager's implementation: SyncManager::SyncInternal
class SyncManager::SyncInternal
Expand Down
10 changes: 6 additions & 4 deletions chrome/browser/sync/engine/syncapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,9 @@ class SyncManager {
ACTION_DELETE,
ACTION_UPDATE,
};
ChangeRecord() : id(kInvalidId), action(ACTION_ADD) {}
ChangeRecord();
~ChangeRecord();

int64 id;
Action action;
sync_pb::EntitySpecifics specifics;
Expand All @@ -585,9 +587,9 @@ class SyncManager {
// access to unencrypted bits.
class ExtraPasswordChangeRecordData : public ExtraChangeRecordData {
public:
ExtraPasswordChangeRecordData(const sync_pb::PasswordSpecificsData& data)
: unencrypted_(data) {}
virtual ~ExtraPasswordChangeRecordData() {}
explicit ExtraPasswordChangeRecordData(
const sync_pb::PasswordSpecificsData& data);
virtual ~ExtraPasswordChangeRecordData();
const sync_pb::PasswordSpecificsData& unencrypted() {
return unencrypted_;
}
Expand Down
4 changes: 4 additions & 0 deletions chrome/common/extensions/extension_message_bundle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ std::string ExtensionMessageBundle::GetL10nMessage(
//
///////////////////////////////////////////////////////////////////////////////

ExtensionToMessagesMap::ExtensionToMessagesMap() {}

ExtensionToMessagesMap::~ExtensionToMessagesMap() {}

ExtensionToL10nMessagesMap* GetExtensionToL10nMessagesMap() {
return &Singleton<ExtensionToMessagesMap>()->messages_map;
}
Expand Down
3 changes: 3 additions & 0 deletions chrome/common/extensions/extension_message_bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ typedef std::map<std::string, L10nMessagesMap > ExtensionToL10nMessagesMap;

// Unique class for Singleton.
struct ExtensionToMessagesMap {
ExtensionToMessagesMap();
~ExtensionToMessagesMap();

// Maps extension ID to message map.
ExtensionToL10nMessagesMap messages_map;
};
Expand Down
27 changes: 27 additions & 0 deletions media/base/callback.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) 2010 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 "media/base/callback.h"

namespace media {

AutoTaskRunner::~AutoTaskRunner() {
if (task_.get()) {
task_->Run();
}
}

Callback0::Type* TaskToCallbackAdapter::NewCallback(Task* task) {
return new TaskToCallbackAdapter(task);
}

TaskToCallbackAdapter::~TaskToCallbackAdapter() {}

void TaskToCallbackAdapter::RunWithParams(const Tuple0& params) {
task_->Run();
}

TaskToCallbackAdapter::TaskToCallbackAdapter(Task* task) : task_(task) {}

} // namespace media
16 changes: 5 additions & 11 deletions media/base/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ class AutoTaskRunner {
: task_(task) {
}

~AutoTaskRunner() {
if (task_.get()) {
task_->Run();
}
}
~AutoTaskRunner();

Task* release() { return task_.release(); }

Expand Down Expand Up @@ -71,16 +67,14 @@ class AutoCallbackRunner {

class TaskToCallbackAdapter : public Callback0::Type {
public:
static Callback0::Type* NewCallback(Task* task) {
return new TaskToCallbackAdapter(task);
}
static Callback0::Type* NewCallback(Task* task);

virtual ~TaskToCallbackAdapter() {}
virtual ~TaskToCallbackAdapter();

virtual void RunWithParams(const Tuple0& params) { task_->Run(); }
virtual void RunWithParams(const Tuple0& params);

private:
TaskToCallbackAdapter(Task* task) : task_(task) {}
TaskToCallbackAdapter(Task* task);

scoped_ptr<Task> task_;

Expand Down
1 change: 1 addition & 0 deletions media/media.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
'audio/win/waveout_output_win.h',
'base/buffers.cc',
'base/buffers.h',
'base/callback.cc',
'base/callback.h',
'base/clock.h',
'base/clock_impl.cc',
Expand Down
21 changes: 21 additions & 0 deletions net/disk_cache/disk_format.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2010 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 "net/disk_cache/disk_format.h"

namespace disk_cache {

IndexHeader::IndexHeader() {
memset(this, 0, sizeof(*this));
magic = kIndexMagic;
version = kCurrentVersion;
}

BlockFileHeader::BlockFileHeader() {
memset(this, 0, sizeof(BlockFileHeader));
magic = kBlockMagic;
version = kCurrentVersion;
}

} // namespace disk_cache
14 changes: 4 additions & 10 deletions net/disk_cache/disk_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ struct LruData {

// Header for the master index file.
struct IndexHeader {
IndexHeader();

uint32 magic;
uint32 version;
int32 num_entries; // Number of entries currently stored.
Expand All @@ -93,11 +95,6 @@ struct IndexHeader {
uint64 create_time; // Creation time for this set of files.
int32 pad[52];
LruData lru; // Eviction control data.
IndexHeader() {
memset(this, 0, sizeof(*this));
magic = kIndexMagic;
version = kCurrentVersion;
};
};

// The structure of the whole index file.
Expand Down Expand Up @@ -177,6 +174,8 @@ typedef uint32 AllocBitmap[kMaxBlocks / 32];
// from the beginning every time).
// This Structure is the header of a block-file:
struct BlockFileHeader {
BlockFileHeader();

uint32 magic;
uint32 version;
int16 this_file; // Index of this file.
Expand All @@ -189,11 +188,6 @@ struct BlockFileHeader {
volatile int32 updating; // Keep track of updates to the header.
int32 user[5];
AllocBitmap allocation_map;
BlockFileHeader() {
memset(this, 0, sizeof(BlockFileHeader));
magic = kBlockMagic;
version = kCurrentVersion;
};
};

COMPILE_ASSERT(sizeof(BlockFileHeader) == kBlockHeaderSize, bad_header);
Expand Down
16 changes: 16 additions & 0 deletions net/disk_cache/file.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2010 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 "net/disk_cache/file.h"

namespace disk_cache {

// Cross platform constructors. Platform specific code is in
// file_{win,posix}.cc.

File::File() : init_(false), mixed_(false) {}

File::File(bool mixed_mode) : init_(false), mixed_(mixed_mode) {}

} // namespace disk_cache
4 changes: 2 additions & 2 deletions net/disk_cache/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class FileIOCallback {
class File : public base::RefCounted<File> {
friend class base::RefCounted<File>;
public:
File() : init_(false), mixed_(false) {}
File();
// mixed_mode set to true enables regular synchronous operations for the file.
explicit File(bool mixed_mode) : init_(false), mixed_(mixed_mode) {}
explicit File(bool mixed_mode);

// Initializes the object to use the passed in file instead of opening it with
// the Init() call. No asynchronous operations can be performed with this
Expand Down
2 changes: 2 additions & 0 deletions net/disk_cache/mem_backend_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ bool MemBackendImpl::Init() {
return true;
}

MemBackendImpl::MemBackendImpl() : max_size_(0), current_size_(0) {}

MemBackendImpl::~MemBackendImpl() {
EntryMap::iterator it = entries_.begin();
while (it != entries_.end()) {
Expand Down
2 changes: 1 addition & 1 deletion net/disk_cache/mem_backend_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MemEntryImpl;
// the operations of the cache without writing to disk.
class MemBackendImpl : public Backend {
public:
MemBackendImpl() : max_size_(0), current_size_(0) {}
MemBackendImpl();
~MemBackendImpl();

// Returns an instance of a Backend implemented only in memory. The returned
Expand Down
11 changes: 11 additions & 0 deletions net/disk_cache/sparse_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ void ChildrenDeleter::DeleteChildren() {

namespace disk_cache {

SparseControl::SparseControl(EntryImpl* entry)
: entry_(entry),
child_(NULL),
operation_(kNoOperation),
init_(false),
child_map_(child_data_.bitmap, kNumSparseBits, kNumSparseBits / 32),
ALLOW_THIS_IN_INITIALIZER_LIST(
child_callback_(this, &SparseControl::OnChildIOCompleted)),
user_callback_(NULL) {
}

SparseControl::~SparseControl() {
if (child_)
CloseChild();
Expand Down
Loading

0 comments on commit b104b50

Please sign in to comment.