diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 14:06:11 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 14:06:11 +0000 |
commit | a66e33a22551f345c784e94e324ef7f59eb82460 (patch) | |
tree | 0cef9730b0d0fe6ad2e4f74f754c3fc17cee4067 /chrome/browser/sync/engine | |
parent | f8efd95f9652964bc214367648c5dfbce8ae9d30 (diff) | |
download | chromium_src-a66e33a22551f345c784e94e324ef7f59eb82460.zip chromium_src-a66e33a22551f345c784e94e324ef7f59eb82460.tar.gz chromium_src-a66e33a22551f345c784e94e324ef7f59eb82460.tar.bz2 |
sync: Get rid of duplicated typedef Closure definition.
The closure.h file just defines a callback type. But base/callback.h already
define a callback with the same type, but with a different name. So just use
the callback from base instead.
BUG=26443
TEST=trybots
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Review URL: http://codereview.chromium.org/2966009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine')
-rw-r--r-- | chrome/browser/sync/engine/model_changing_syncer_command.cc | 5 | ||||
-rw-r--r-- | chrome/browser/sync/engine/model_safe_worker.h | 6 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncapi.cc | 1 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncer.cc | 3 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncer.h | 6 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncer_unittest.cc | 3 |
6 files changed, 10 insertions, 14 deletions
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.cc b/chrome/browser/sync/engine/model_changing_syncer_command.cc index c9f2d4d..b2131b4 100644 --- a/chrome/browser/sync/engine/model_changing_syncer_command.cc +++ b/chrome/browser/sync/engine/model_changing_syncer_command.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// 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. @@ -8,7 +8,6 @@ #include "chrome/browser/sync/engine/model_safe_worker.h" #include "chrome/browser/sync/sessions/status_controller.h" #include "chrome/browser/sync/sessions/sync_session.h" -#include "chrome/browser/sync/util/closure.h" namespace browser_sync { @@ -24,7 +23,7 @@ void ModelChangingSyncerCommand::ExecuteImpl(sessions::SyncSession* session) { sessions::StatusController* status = work_session_->status_controller(); sessions::ScopedModelSafeGroupRestriction r(status, group); - scoped_ptr<Closure> c(NewCallback(this, + scoped_ptr<Callback0::Type> c(NewCallback(this, &ModelChangingSyncerCommand::StartChangingModel)); worker->DoWorkAndWaitUntilDone(c.get()); } diff --git a/chrome/browser/sync/engine/model_safe_worker.h b/chrome/browser/sync/engine/model_safe_worker.h index 597797c..7b84fd3 100644 --- a/chrome/browser/sync/engine/model_safe_worker.h +++ b/chrome/browser/sync/engine/model_safe_worker.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// 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. @@ -9,9 +9,9 @@ #include <string> #include <vector> +#include "base/callback.h" #include "base/ref_counted.h" #include "chrome/browser/sync/syncable/model_type.h" -#include "chrome/browser/sync/util/closure.h" #include "chrome/browser/sync/util/sync_types.h" namespace browser_sync { @@ -47,7 +47,7 @@ class ModelSafeWorker : public base::RefCountedThreadSafe<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(Closure* work) { + virtual void DoWorkAndWaitUntilDone(Callback0::Type* work) { work->Run(); // For GROUP_PASSIVE, we do the work on the current thread. } diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 26706db..04088ab 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -46,7 +46,6 @@ #include "chrome/browser/sync/sessions/sync_session_context.h" #include "chrome/browser/sync/syncable/directory_manager.h" #include "chrome/browser/sync/syncable/syncable.h" -#include "chrome/browser/sync/util/closure.h" #include "chrome/browser/sync/util/crypto_helpers.h" #include "chrome/browser/sync/util/user_settings.h" #include "chrome/common/chrome_switches.h" diff --git a/chrome/browser/sync/engine/syncer.cc b/chrome/browser/sync/engine/syncer.cc index b3608c6..f64de42 100644 --- a/chrome/browser/sync/engine/syncer.cc +++ b/chrome/browser/sync/engine/syncer.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. @@ -28,7 +28,6 @@ #include "chrome/browser/sync/syncable/directory_manager.h" #include "chrome/browser/sync/syncable/syncable-inl.h" #include "chrome/browser/sync/syncable/syncable.h" -#include "chrome/browser/sync/util/closure.h" using base::TimeDelta; using sync_pb::ClientCommand; diff --git a/chrome/browser/sync/engine/syncer.h b/chrome/browser/sync/engine/syncer.h index 820f760..2930bb8 100644 --- a/chrome/browser/sync/engine/syncer.h +++ b/chrome/browser/sync/engine/syncer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. @@ -10,6 +10,7 @@ #include <vector> #include "base/basictypes.h" +#include "base/callback.h" #include "base/gtest_prod_util.h" #include "base/lock.h" #include "base/scoped_ptr.h" @@ -18,7 +19,6 @@ #include "chrome/browser/sync/engine/syncproto.h" #include "chrome/browser/sync/sessions/sync_session.h" #include "chrome/browser/sync/syncable/directory_event.h" -#include "chrome/browser/sync/util/closure.h" #include "chrome/browser/sync/util/extensions_activity_monitor.h" #include "chrome/common/deprecated/event_sys.h" #include "chrome/common/deprecated/event_sys-inl.h" @@ -164,7 +164,7 @@ class Syncer { // A callback hook used in unittests to simulate changes between conflict set // building and conflict resolution. - Closure* pre_conflict_resolution_closure_; + Callback0::Type* pre_conflict_resolution_closure_; friend class SyncerTest; FRIEND_TEST_ALL_PREFIXES(SyncerTest, NameClashWithResolver); diff --git a/chrome/browser/sync/engine/syncer_unittest.cc b/chrome/browser/sync/engine/syncer_unittest.cc index f2077e3..2eab857 100644 --- a/chrome/browser/sync/engine/syncer_unittest.cc +++ b/chrome/browser/sync/engine/syncer_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. // @@ -27,7 +27,6 @@ #include "chrome/browser/sync/protocol/sync.pb.h" #include "chrome/browser/sync/syncable/directory_manager.h" #include "chrome/browser/sync/syncable/syncable.h" -#include "chrome/browser/sync/util/closure.h" #include "chrome/common/deprecated/event_sys-inl.h" #include "chrome/test/sync/engine/mock_connection_manager.h" #include "chrome/test/sync/engine/test_directory_setter_upper.h" |