diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-27 18:51:01 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-27 18:51:01 +0000 |
commit | d2f05d07a90cf5c5bad814b603175acaefa254b5 (patch) | |
tree | 8e5e8d7724b8b505d418ea01277bc3f305d16182 /chrome/browser/sync | |
parent | c3dd6dad0308d941cad3d9e72787177875d065b6 (diff) | |
download | chromium_src-d2f05d07a90cf5c5bad814b603175acaefa254b5.zip chromium_src-d2f05d07a90cf5c5bad814b603175acaefa254b5.tar.gz chromium_src-d2f05d07a90cf5c5bad814b603175acaefa254b5.tar.bz2 |
Part 1 of repairing regressions to my old clang check plugins so Nico 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
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r-- | chrome/browser/sync/engine/syncer_thread2.cc | 20 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncer_thread2.h | 20 | ||||
-rw-r--r-- | chrome/browser/sync/glue/autofill_profile_model_associator.cc | 7 | ||||
-rw-r--r-- | chrome/browser/sync/glue/autofill_profile_model_associator.h | 4 | ||||
-rw-r--r-- | chrome/browser/sync/glue/session_model_associator.cc | 16 | ||||
-rw-r--r-- | chrome/browser/sync/glue/session_model_associator.h | 13 | ||||
-rw-r--r-- | chrome/browser/sync/glue/sync_backend_host.cc | 19 | ||||
-rw-r--r-- | chrome/browser/sync/glue/sync_backend_host.h | 10 |
8 files changed, 72 insertions, 37 deletions
diff --git a/chrome/browser/sync/engine/syncer_thread2.cc b/chrome/browser/sync/engine/syncer_thread2.cc index dfb9b95..c53ea15 100644 --- a/chrome/browser/sync/engine/syncer_thread2.cc +++ b/chrome/browser/sync/engine/syncer_thread2.cc @@ -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() {} diff --git a/chrome/browser/sync/engine/syncer_thread2.h b/chrome/browser/sync/engine/syncer_thread2.h index e60b5f4..138d2a5 100644 --- a/chrome/browser/sync/engine/syncer_thread2.h +++ b/chrome/browser/sync/engine/syncer_thread2.h @@ -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 { diff --git a/chrome/browser/sync/glue/autofill_profile_model_associator.cc b/chrome/browser/sync/glue/autofill_profile_model_associator.cc index e6e33d7..0b7e651 100644 --- a/chrome/browser/sync/glue/autofill_profile_model_associator.cc +++ b/chrome/browser/sync/glue/autofill_profile_model_associator.cc @@ -470,5 +470,12 @@ bool AutofillProfileModelAssociator::IsAbortPending() { return abort_association_pending_; } +AutofillProfileModelAssociator::DataBundle::DataBundle() {} + +AutofillProfileModelAssociator::DataBundle::~DataBundle() { + STLDeleteElements(&new_profiles); +} + + } // namespace browser_sync diff --git a/chrome/browser/sync/glue/autofill_profile_model_associator.h b/chrome/browser/sync/glue/autofill_profile_model_associator.h index fdc67f1..f5d999ea 100644 --- a/chrome/browser/sync/glue/autofill_profile_model_associator.h +++ b/chrome/browser/sync/glue/autofill_profile_model_associator.h @@ -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 diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc index 21b2d91..cad5b98 100644 --- a/chrome/browser/sync/glue/session_model_associator.cc +++ b/chrome/browser/sync/glue/session_model_associator.cc @@ -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; @@ -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; diff --git a/chrome/browser/sync/glue/session_model_associator.h b/chrome/browser/sync/glue/session_model_associator.h index cff376f..b6746cf 100644 --- a/chrome/browser/sync/glue/session_model_associator.h +++ b/chrome/browser/sync/glue/session_model_associator.h @@ -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 @@ -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. diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc index 6ff01af..9b154fd 100644 --- a/chrome/browser/sync/glue/sync_backend_host.cc +++ b/chrome/browser/sync/glue/sync_backend_host.cc @@ -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(); diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h index 14ffebb..01954a5 100644 --- a/chrome/browser/sync/glue/sync_backend_host.h +++ b/chrome/browser/sync/glue/sync_backend_host.h @@ -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; |