summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-27 00:11:43 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-27 00:11:43 +0000
commitc80ec7e37d4c1fd2a49daf0ffb2a173d3dce6903 (patch)
treed61631627c675b814616009506cdbc62981fd6a8
parent8119f8d3bfb0dfd69fc73d48fb853eabbcda6f67 (diff)
downloadchromium_src-c80ec7e37d4c1fd2a49daf0ffb2a173d3dce6903.zip
chromium_src-c80ec7e37d4c1fd2a49daf0ffb2a173d3dce6903.tar.gz
chromium_src-c80ec7e37d4c1fd2a49daf0ffb2a173d3dce6903.tar.bz2
sync: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST.
It's no longer providing value as the MSVC warning is disabled during compilation. Refer to bug for details. BUG=234765 Review URL: https://chromiumcodereview.appspot.com/14335008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196892 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--sync/engine/sync_scheduler_impl.cc4
-rw-r--r--sync/engine/sync_scheduler_unittest.cc2
-rw-r--r--sync/internal_api/debug_info_event_listener.cc2
-rw-r--r--sync/internal_api/js_mutation_event_observer.cc2
-rw-r--r--sync/internal_api/public/util/weak_handle_unittest.cc2
-rw-r--r--sync/internal_api/sync_encryption_handler_impl.cc2
-rw-r--r--sync/internal_api/sync_manager_impl.cc2
-rw-r--r--sync/notifier/non_blocking_invalidator.cc2
-rw-r--r--sync/notifier/sync_invalidation_listener.cc7
-rw-r--r--sync/notifier/sync_system_resources.cc2
10 files changed, 13 insertions, 14 deletions
diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc
index 0fd7ac0..2b2a127 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -152,8 +152,8 @@ SyncSchedulerImpl::SyncSchedulerImpl(const std::string& name,
BackoffDelayProvider* delay_provider,
sessions::SyncSessionContext* context,
Syncer* syncer)
- : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
- weak_ptr_factory_for_weak_handle_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ : weak_ptr_factory_(this),
+ weak_ptr_factory_for_weak_handle_(this),
weak_handle_this_(MakeWeakHandle(
weak_ptr_factory_for_weak_handle_.GetWeakPtr())),
name_(name),
diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc
index a890117..ffb2e57 100644
--- a/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -93,7 +93,7 @@ static const size_t kMinNumSamples = 5;
class SyncSchedulerTest : public testing::Test {
public:
SyncSchedulerTest()
- : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ : weak_ptr_factory_(this),
context_(NULL),
syncer_(NULL),
delay_(NULL) {}
diff --git a/sync/internal_api/debug_info_event_listener.cc b/sync/internal_api/debug_info_event_listener.cc
index f9c0d89..4beef12 100644
--- a/sync/internal_api/debug_info_event_listener.cc
+++ b/sync/internal_api/debug_info_event_listener.cc
@@ -14,7 +14,7 @@ DebugInfoEventListener::DebugInfoEventListener()
: events_dropped_(false),
cryptographer_has_pending_keys_(false),
cryptographer_ready_(false),
- weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
+ weak_ptr_factory_(this) {
}
DebugInfoEventListener::~DebugInfoEventListener() {
diff --git a/sync/internal_api/js_mutation_event_observer.cc b/sync/internal_api/js_mutation_event_observer.cc
index 2dd3e51..6d85620 100644
--- a/sync/internal_api/js_mutation_event_observer.cc
+++ b/sync/internal_api/js_mutation_event_observer.cc
@@ -16,7 +16,7 @@
namespace syncer {
JsMutationEventObserver::JsMutationEventObserver()
- : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {}
+ : weak_ptr_factory_(this) {}
JsMutationEventObserver::~JsMutationEventObserver() {
DCHECK(CalledOnValidThread());
diff --git a/sync/internal_api/public/util/weak_handle_unittest.cc b/sync/internal_api/public/util/weak_handle_unittest.cc
index a7f0c1a..fcfd7bd 100644
--- a/sync/internal_api/public/util/weak_handle_unittest.cc
+++ b/sync/internal_api/public/util/weak_handle_unittest.cc
@@ -21,7 +21,7 @@ using ::testing::StrictMock;
class Base {
public:
- Base() : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {}
+ Base() : weak_ptr_factory_(this) {}
WeakHandle<Base> AsWeakHandle() {
return MakeWeakHandle(weak_ptr_factory_.GetWeakPtr());
diff --git a/sync/internal_api/sync_encryption_handler_impl.cc b/sync/internal_api/sync_encryption_handler_impl.cc
index 655feb2..86c3e66 100644
--- a/sync/internal_api/sync_encryption_handler_impl.cc
+++ b/sync/internal_api/sync_encryption_handler_impl.cc
@@ -210,7 +210,7 @@ SyncEncryptionHandlerImpl::SyncEncryptionHandlerImpl(
Encryptor* encryptor,
const std::string& restored_key_for_bootstrapping,
const std::string& restored_keystore_key_for_bootstrapping)
- : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ : weak_ptr_factory_(this),
user_share_(user_share),
vault_unsafe_(encryptor, SensitiveTypes()),
encrypt_everything_(false),
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index fcccff6..2f74e2e 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -168,7 +168,7 @@ class NudgeStrategy {
SyncManagerImpl::SyncManagerImpl(const std::string& name)
: name_(name),
- weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ weak_ptr_factory_(this),
change_delegate_(NULL),
initialized_(false),
observing_network_connectivity_changes_(false),
diff --git a/sync/notifier/non_blocking_invalidator.cc b/sync/notifier/non_blocking_invalidator.cc
index d366e31..a67b196 100644
--- a/sync/notifier/non_blocking_invalidator.cc
+++ b/sync/notifier/non_blocking_invalidator.cc
@@ -141,7 +141,7 @@ NonBlockingInvalidator::NonBlockingInvalidator(
const WeakHandle<InvalidationStateTracker>&
invalidation_state_tracker,
const std::string& client_info)
- : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ : weak_ptr_factory_(this),
core_(
new Core(MakeWeakHandle(weak_ptr_factory_.GetWeakPtr()))),
parent_task_runner_(
diff --git a/sync/notifier/sync_invalidation_listener.cc b/sync/notifier/sync_invalidation_listener.cc
index 44faac5..8d39755 100644
--- a/sync/notifier/sync_invalidation_listener.cc
+++ b/sync/notifier/sync_invalidation_listener.cc
@@ -31,11 +31,10 @@ SyncInvalidationListener::Delegate::~Delegate() {}
SyncInvalidationListener::SyncInvalidationListener(
base::TickClock* tick_clock,
scoped_ptr<notifier::PushClient> push_client)
- : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
- ack_tracker_(tick_clock, ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ : weak_ptr_factory_(this),
+ ack_tracker_(tick_clock, this),
push_client_(push_client.get()),
- sync_system_resources_(push_client.Pass(),
- ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ sync_system_resources_(push_client.Pass(), this),
delegate_(NULL),
ticl_state_(DEFAULT_INVALIDATION_ERROR),
push_client_state_(DEFAULT_INVALIDATION_ERROR) {
diff --git a/sync/notifier/sync_system_resources.cc b/sync/notifier/sync_system_resources.cc
index 3fc31fc..386bffe 100644
--- a/sync/notifier/sync_system_resources.cc
+++ b/sync/notifier/sync_system_resources.cc
@@ -61,7 +61,7 @@ void SyncLogger::SetSystemResources(invalidation::SystemResources* resources) {
}
SyncInvalidationScheduler::SyncInvalidationScheduler()
- : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
+ : weak_factory_(this),
created_on_loop_(MessageLoop::current()),
is_started_(false),
is_stopped_(false) {