Skip to content

Commit

Permalink
Part 1 of repairing regressions to my old clang check plugins so Nico…
Browse files Browse the repository at this point in the history
… can

deploy the clang plugins to the waterfall/trybots.

BUG=none
TEST=compiles

Review URL: http://codereview.chromium.org/6366019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72846 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
erg@google.com committed Jan 27, 2011
1 parent c3dd6da commit d2f05d0
Show file tree
Hide file tree
Showing 61 changed files with 330 additions and 120 deletions.
2 changes: 2 additions & 0 deletions chrome/browser/autocomplete/history_url_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ bool HistoryURLProvider::PromoteMatchForInlineAutocomplete(
return true;
}

HistoryURLProvider::~HistoryURLProvider() {}

// static
history::Prefixes HistoryURLProvider::GetPrefixes() {
// We'll complete text following these prefixes.
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/autocomplete/history_url_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class HistoryURLProvider : public HistoryProvider {
void QueryComplete(HistoryURLProviderParams* params_gets_deleted);

private:
~HistoryURLProvider() {}
~HistoryURLProvider();

// Returns the set of prefixes to use for prefixes_.
static history::Prefixes GetPrefixes();
Expand Down
27 changes: 27 additions & 0 deletions chrome/browser/browsing_data_database_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,33 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"

BrowsingDataDatabaseHelper::DatabaseInfo::DatabaseInfo() {}

BrowsingDataDatabaseHelper::DatabaseInfo::DatabaseInfo(
const std::string& host,
const std::string& database_name,
const std::string& origin_identifier,
const std::string& description,
const std::string& origin,
int64 size,
base::Time last_modified)
: host(host),
database_name(database_name),
origin_identifier(origin_identifier),
description(description),
origin(origin),
size(size),
last_modified(last_modified) {
}

BrowsingDataDatabaseHelper::DatabaseInfo::~DatabaseInfo() {}

bool BrowsingDataDatabaseHelper::DatabaseInfo::IsFileSchemeData() {
return StartsWithASCII(origin_identifier,
std::string(chrome::kFileScheme),
true);
}

BrowsingDataDatabaseHelper::BrowsingDataDatabaseHelper(Profile* profile)
: tracker_(profile->GetDatabaseTracker()),
completion_callback_(NULL),
Expand Down
21 changes: 5 additions & 16 deletions chrome/browser/browsing_data_database_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,17 @@ class BrowsingDataDatabaseHelper
public:
// Contains detailed information about a web database.
struct DatabaseInfo {
DatabaseInfo() {}
DatabaseInfo();
DatabaseInfo(const std::string& host,
const std::string& database_name,
const std::string& origin_identifier,
const std::string& description,
const std::string& origin,
int64 size,
base::Time last_modified)
: host(host),
database_name(database_name),
origin_identifier(origin_identifier),
description(description),
origin(origin),
size(size),
last_modified(last_modified) {
}

bool IsFileSchemeData() {
return StartsWithASCII(origin_identifier,
std::string(chrome::kFileScheme),
true);
}
base::Time last_modified);
~DatabaseInfo();

bool IsFileSchemeData();

std::string host;
std::string database_name;
Expand Down
21 changes: 21 additions & 0 deletions chrome/browser/browsing_data_indexed_db_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,27 @@ void BrowsingDataIndexedDBHelperImpl::DeleteIndexedDBFileInWebKitThread(

} // namespace

BrowsingDataIndexedDBHelper::IndexedDBInfo::IndexedDBInfo(
const std::string& protocol,
const std::string& host,
unsigned short port,
const std::string& database_identifier,
const std::string& origin,
const FilePath& file_path,
int64 size,
base::Time last_modified)
: protocol(protocol),
host(host),
port(port),
database_identifier(database_identifier),
origin(origin),
file_path(file_path),
size(size),
last_modified(last_modified) {
}

BrowsingDataIndexedDBHelper::IndexedDBInfo::~IndexedDBInfo() {}

// static
BrowsingDataIndexedDBHelper* BrowsingDataIndexedDBHelper::Create(
Profile* profile) {
Expand Down
12 changes: 2 additions & 10 deletions chrome/browser/browsing_data_indexed_db_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,8 @@ class BrowsingDataIndexedDBHelper
const std::string& origin,
const FilePath& file_path,
int64 size,
base::Time last_modified)
: protocol(protocol),
host(host),
port(port),
database_identifier(database_identifier),
origin(origin),
file_path(file_path),
size(size),
last_modified(last_modified) {
}
base::Time last_modified);
~IndexedDBInfo();

bool IsFileSchemeData() {
return protocol == chrome::kFileScheme;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/debugger/inspectable_tab_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class DevToolsClientHostImpl : public DevToolsClientHost {
private:
// Message handling routines
void OnDebuggerOutput(const std::string& msg);
void FrameNavigating(const std::string& url);
virtual void FrameNavigating(const std::string& url);
void TabClosed();

int32 id_;
Expand Down
20 changes: 20 additions & 0 deletions chrome/browser/sync/engine/syncer_thread2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ using sync_pb::GetUpdatesCallerInfo;

namespace s3 {

struct SyncerThread::WaitInterval {
enum Mode {
// A wait interval whose duration has been affected by exponential
// backoff.
// EXPONENTIAL_BACKOFF intervals are nudge-rate limited to 1 per interval.
EXPONENTIAL_BACKOFF,
// A server-initiated throttled interval. We do not allow any syncing
// during such an interval.
THROTTLED,
};
Mode mode;

// This bool is set to true if we have observed a nudge during this
// interval and mode == EXPONENTIAL_BACKOFF.
bool had_nudge;
base::TimeDelta length;
base::OneShotTimer<SyncerThread> timer;
WaitInterval(Mode mode, base::TimeDelta length);
};

SyncerThread::DelayProvider::DelayProvider() {}
SyncerThread::DelayProvider::~DelayProvider() {}

Expand Down
20 changes: 1 addition & 19 deletions chrome/browser/sync/engine/syncer_thread2.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,25 +84,7 @@ class SyncerThread : public sessions::SyncSession::Delegate {
friend class SyncerThread2Test;

// State pertaining to exponential backoff or throttling periods.
struct WaitInterval {
enum Mode {
// A wait interval whose duration has been affected by exponential
// backoff.
// EXPONENTIAL_BACKOFF intervals are nudge-rate limited to 1 per interval.
EXPONENTIAL_BACKOFF,
// A server-initiated throttled interval. We do not allow any syncing
// during such an interval.
THROTTLED,
};
Mode mode;

// This bool is set to true if we have observed a nudge during this
// interval and mode == EXPONENTIAL_BACKOFF.
bool had_nudge;
base::TimeDelta length;
base::OneShotTimer<SyncerThread> timer;
WaitInterval(Mode mode, base::TimeDelta length);
};
struct WaitInterval;

// Internal state for every sync task that is scheduled.
struct SyncSessionJob {
Expand Down
7 changes: 7 additions & 0 deletions chrome/browser/sync/glue/autofill_profile_model_associator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -470,5 +470,12 @@ bool AutofillProfileModelAssociator::IsAbortPending() {
return abort_association_pending_;
}

AutofillProfileModelAssociator::DataBundle::DataBundle() {}

AutofillProfileModelAssociator::DataBundle::~DataBundle() {
STLDeleteElements(&new_profiles);
}


} // namespace browser_sync

4 changes: 3 additions & 1 deletion chrome/browser/sync/glue/autofill_profile_model_associator.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,13 @@ class AutofillProfileModelAssociator
};

struct AutofillProfileModelAssociator::DataBundle {
DataBundle();
~DataBundle();

std::set<std::string> current_profiles;
std::vector<std::string> profiles_to_delete;
std::vector<AutoFillProfile*> updated_profiles;
std::vector<AutoFillProfile*> new_profiles; // We own these pointers.
~DataBundle() { STLDeleteElements(&new_profiles); }
};

} // namespace browser_sync
Expand Down
16 changes: 16 additions & 0 deletions chrome/browser/sync/glue/session_model_associator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ int64 SessionModelAssociator::GetSyncIdFromSessionTag(const std::string& tag) {
return sync_api::kInvalidId;
return node.GetId();
}

const TabContents*
SessionModelAssociator::GetChromeNodeFromSyncId(int64 sync_id) {
NOTREACHED();
return NULL;
}

bool SessionModelAssociator::InitSyncNodeFromChromeId(
const size_t& id,
sync_api::BaseNode* sync_node) {
NOTREACHED();
return false;
}

void SessionModelAssociator::ReassociateWindows(bool reload_tabs) {
DCHECK(CalledOnValidThread());
sync_pb::SessionSpecifics specifics;
Expand Down Expand Up @@ -692,6 +706,8 @@ SessionModelAssociator::TabNodePool::TabNodePool(
sync_service_(sync_service) {
}

SessionModelAssociator::TabNodePool::~TabNodePool() {}

void SessionModelAssociator::TabNodePool::AddTabNode(int64 sync_id) {
tab_syncid_pool_.resize(tab_syncid_pool_.size() + 1);
tab_syncid_pool_[static_cast<size_t>(++tab_pool_fp_)] = sync_id;
Expand Down
13 changes: 4 additions & 9 deletions chrome/browser/sync/glue/session_model_associator.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,11 @@ class SessionModelAssociator
virtual int64 GetSyncIdFromSessionTag(const std::string& tag);

// Not used.
virtual const TabContents* GetChromeNodeFromSyncId(int64 sync_id) {
NOTREACHED();
return NULL;
}
virtual const TabContents* GetChromeNodeFromSyncId(int64 sync_id);

// Not used.
bool InitSyncNodeFromChromeId(const size_t& id,
sync_api::BaseNode* sync_node) {
NOTREACHED();
return false;
}
virtual bool InitSyncNodeFromChromeId(const size_t& id,
sync_api::BaseNode* sync_node);

// Resync local window information. Updates the local sessions header node
// with the status of open windows and the order of tabs they contain. Should
Expand Down Expand Up @@ -224,6 +218,7 @@ class SessionModelAssociator
class TabNodePool {
public:
explicit TabNodePool(ProfileSyncService* sync_service);
~TabNodePool();

// Add a previously allocated tab sync node to our pool. Increases the size
// of tab_syncid_pool_ by one and marks the new tab node as free.
Expand Down
19 changes: 19 additions & 0 deletions chrome/browser/sync/glue/sync_backend_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,25 @@ void SyncBackendHost::Core::NotifyUpdatedToken(const std::string& token) {
Details<const TokenAvailableDetails>(&details));
}

SyncBackendHost::Core::DoInitializeOptions::DoInitializeOptions(
const GURL& service_url,
sync_api::HttpPostProviderFactory* http_bridge_factory,
const sync_api::SyncCredentials& credentials,
bool delete_sync_data_folder,
const notifier::NotifierOptions& notifier_options,
std::string restored_key_for_bootstrapping,
bool setup_for_test_mode)
: service_url(service_url),
http_bridge_factory(http_bridge_factory),
credentials(credentials),
delete_sync_data_folder(delete_sync_data_folder),
notifier_options(notifier_options),
restored_key_for_bootstrapping(restored_key_for_bootstrapping),
setup_for_test_mode(setup_for_test_mode) {
}

SyncBackendHost::Core::DoInitializeOptions::~DoInitializeOptions() {}

sync_api::UserShare* SyncBackendHost::GetUserShare() const {
DCHECK(syncapi_initialized_);
return core_->syncapi()->GetUserShare();
Expand Down
10 changes: 2 additions & 8 deletions chrome/browser/sync/glue/sync_backend_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,8 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
bool delete_sync_data_folder,
const notifier::NotifierOptions& notifier_options,
std::string restored_key_for_bootstrapping,
bool setup_for_test_mode)
: service_url(service_url),
http_bridge_factory(http_bridge_factory),
credentials(credentials),
delete_sync_data_folder(delete_sync_data_folder),
notifier_options(notifier_options),
restored_key_for_bootstrapping(restored_key_for_bootstrapping),
setup_for_test_mode(setup_for_test_mode) {}
bool setup_for_test_mode);
~DoInitializeOptions();

GURL service_url;
sync_api::HttpPostProviderFactory* http_bridge_factory;
Expand Down
9 changes: 9 additions & 0 deletions chrome/browser/tab_contents/web_navigation_observer.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) 2011 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/browser/tab_contents/web_navigation_observer.h"

bool WebNavigationObserver::OnMessageReceived(const IPC::Message& message) {
return false;
}
4 changes: 2 additions & 2 deletions chrome/browser/tab_contents/web_navigation_observer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Copyright (c) 2011 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.

Expand Down Expand Up @@ -27,7 +27,7 @@ class WebNavigationObserver : public IPC::Channel::Listener {
virtual void DidStopLoading() { }

// IPC::Channel::Listener implementation.
virtual bool OnMessageReceived(const IPC::Message& message) { return false; }
virtual bool OnMessageReceived(const IPC::Message& message);

#if 0
// For unifying with delegate...
Expand Down
1 change: 1 addition & 0 deletions chrome/chrome_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2581,6 +2581,7 @@
'browser/tab_contents/web_drag_utils_win.h',
'browser/tab_contents/web_drop_target_win.cc',
'browser/tab_contents/web_drop_target_win.h',
'browser/tab_contents/web_navigation_observer.cc',
'browser/tab_contents/web_navigation_observer.h',
'browser/tabs/default_tab_handler.cc',
'browser/tabs/default_tab_handler.h',
Expand Down
3 changes: 3 additions & 0 deletions chrome/chrome_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@
'common/persistent_pref_store.h',
'common/pref_store.cc',
'common/pref_store.h',
'common/remoting/chromoting_host_info.cc',
'common/remoting/chromoting_host_info.h',
'common/render_messages.cc',
'common/render_messages.h',
'common/render_messages_internal.h',
Expand Down Expand Up @@ -506,6 +508,7 @@
'common/net/url_request_context_getter.h',
'common/net/url_request_intercept_job.cc',
'common/net/url_request_intercept_job.h',
'common/net/gaia/gaia_auth_consumer.cc',
'common/net/gaia/gaia_auth_consumer.h',
'common/net/gaia/gaia_auth_fetcher.cc',
'common/net/gaia/gaia_auth_fetcher.h',
Expand Down
2 changes: 1 addition & 1 deletion chrome/common/appcache/appcache_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AppCacheDispatcher : public IPC::Channel::Listener {
AppCacheBackendProxy* backend_proxy() { return &backend_proxy_; }

// IPC::Channel::Listener implementation
bool OnMessageReceived(const IPC::Message& msg);
virtual bool OnMessageReceived(const IPC::Message& msg);

private:
// Ipc message handlers
Expand Down
Loading

0 comments on commit d2f05d0

Please sign in to comment.