diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 21:23:00 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 21:23:00 +0000 |
commit | 763f848ffbd28b22a6c2aa32bf28184d9c17b366 (patch) | |
tree | c6e662f3b95f1b52866c840a96d8ce02a75032cd /chrome/browser/sync/engine | |
parent | 314feb0bc9a98d6ea9cfb576485bf82dd07ffe84 (diff) | |
download | chromium_src-763f848ffbd28b22a6c2aa32bf28184d9c17b366.zip chromium_src-763f848ffbd28b22a6c2aa32bf28184d9c17b366.tar.gz chromium_src-763f848ffbd28b22a6c2aa32bf28184d9c17b366.tar.bz2 |
FBTF: Another big ctor/dtor cleanup found by automated tools.
(Shaves ~2MB off Linux Debug .a files)
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3563004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine')
-rw-r--r-- | chrome/browser/sync/engine/model_safe_worker.cc | 17 | ||||
-rw-r--r-- | chrome/browser/sync/engine/model_safe_worker.h | 17 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncapi.cc | 1 |
3 files changed, 23 insertions, 12 deletions
diff --git a/chrome/browser/sync/engine/model_safe_worker.cc b/chrome/browser/sync/engine/model_safe_worker.cc index 3f3ddb4..c488e3b 100644 --- a/chrome/browser/sync/engine/model_safe_worker.cc +++ b/chrome/browser/sync/engine/model_safe_worker.cc @@ -38,4 +38,21 @@ std::string ModelSafeGroupToString(ModelSafeGroup group) { } } +ModelSafeWorker::ModelSafeWorker() {} + +ModelSafeWorker::~ModelSafeWorker() {} + +void ModelSafeWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { + work->Run(); // For GROUP_PASSIVE, we do the work on the current thread. +} + +ModelSafeGroup ModelSafeWorker::GetModelSafeGroup() { + return GROUP_PASSIVE; +} + +bool ModelSafeWorker::CurrentThreadIsWorkThread() { + // The passive group is not the work thread for any browser model. + return false; +} + } // namespace browser_sync diff --git a/chrome/browser/sync/engine/model_safe_worker.h b/chrome/browser/sync/engine/model_safe_worker.h index 4164ff5..9f31c67 100644 --- a/chrome/browser/sync/engine/model_safe_worker.h +++ b/chrome/browser/sync/engine/model_safe_worker.h @@ -41,28 +41,21 @@ std::string ModelSafeGroupToString(ModelSafeGroup group); // syncable::Directory due to a race. class ModelSafeWorker : public base::RefCountedThreadSafe<ModelSafeWorker> { public: - ModelSafeWorker() { } - virtual ~ModelSafeWorker() { } + ModelSafeWorker(); + virtual ~ModelSafeWorker(); // Any time the Syncer performs model modifications (e.g employing a // WriteTransaction), it should be done by this method to ensure it is done // from a model-safe thread. - virtual void DoWorkAndWaitUntilDone(Callback0::Type* work) { - work->Run(); // For GROUP_PASSIVE, we do the work on the current thread. - } + virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); - virtual ModelSafeGroup GetModelSafeGroup() { - return GROUP_PASSIVE; - } + virtual ModelSafeGroup GetModelSafeGroup(); // Check the current thread and see if it's the thread associated with // this worker. If this returns true, then it should be safe to operate // on models that are in this worker's group. If this returns false, // such work should not be attempted. - virtual bool CurrentThreadIsWorkThread() { - // The passive group is not the work thread for any browser model. - return false; - } + virtual bool CurrentThreadIsWorkThread(); private: friend class base::RefCountedThreadSafe<ModelSafeWorker>; diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 4728534..f91d0f8 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -24,6 +24,7 @@ #include "base/task.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/chrome_thread.h" #include "chrome/browser/sync/sync_constants.h" #include "chrome/browser/sync/engine/all_status.h" #include "chrome/browser/sync/engine/change_reorder_buffer.h" |