Commit aa46ba58 authored by scherkus@chromium.org's avatar scherkus@chromium.org

remoting: 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/14522010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196888 0039d316-1c4b-4281-b951-d872f2087c98
parent 083237ba
......@@ -20,7 +20,7 @@ int kReadBufferSize = 4096;
SocketReader::SocketReader()
: socket_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
SocketReader::~SocketReader() {
......
......@@ -36,7 +36,7 @@ ChromotingClient::ChromotingClient(
connection_(connection),
user_interface_(user_interface),
host_capabilities_received_(false),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
weak_factory_(this) {
rectangle_decoder_ =
new RectangleUpdateDecoder(client_context->main_task_runner(),
client_context->decode_task_runner(),
......
......@@ -182,7 +182,7 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
#endif
input_handler_(&key_mapper_),
use_async_pin_dialog_(false),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
weak_factory_(this) {
RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL);
RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD);
......
......@@ -19,7 +19,7 @@ PepperNetworkManager::PepperNetworkManager(const pp::InstanceHandle& instance)
this),
start_count_(0),
network_list_received_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
PepperNetworkManager::~PepperNetworkManager() {
......
......@@ -110,7 +110,7 @@ UdpPacketSocket::UdpPacketSocket(const pp::InstanceHandle& instance)
max_port_(0),
send_pending_(false),
send_queue_size_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
UdpPacketSocket::~UdpPacketSocket() {
......
......@@ -95,7 +95,7 @@ PepperPortAllocatorSession::PepperPortAllocatorSession(
stun_address_resolver_(instance_),
stun_port_(0),
relay_response_received_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
if (stun_hosts.size() > 0) {
stun_address_ = stun_hosts[0];
}
......
......@@ -12,7 +12,7 @@ PepperTokenFetcher::PepperTokenFetcher(base::WeakPtr<ChromotingInstance> plugin,
const std::string& host_public_key)
: plugin_(plugin),
host_public_key_(host_public_key),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
PepperTokenFetcher::~PepperTokenFetcher() {
......
......@@ -81,7 +81,7 @@ ChromotingHost::ChromotingHost(
login_backoff_(&kDefaultBackoffPolicy),
authenticating_client_(false),
reject_authenticating_client_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
DCHECK(signal_strategy);
DCHECK(network_task_runner_->BelongsToCurrentThread());
......
......@@ -47,7 +47,7 @@ ClientSession::ClientSession(
: event_handler_(event_handler),
connection_(connection.Pass()),
client_jid_(connection_->session()->jid()),
control_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
control_factory_(this),
desktop_environment_factory_(desktop_environment_factory),
input_tracker_(&host_input_filter_),
remote_input_filter_(&input_tracker_),
......
......@@ -167,7 +167,7 @@ DaemonProcess::DaemonProcess(
caller_task_runner_(caller_task_runner),
io_task_runner_(io_task_runner),
next_terminal_id_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
DCHECK(caller_task_runner->BelongsToCurrentThread());
}
......
......@@ -490,7 +490,7 @@ DesktopSessionAgent::DesktopSessionAgent(
input_task_runner_(input_task_runner),
io_task_runner_(io_task_runner),
video_capture_task_runner_(video_capture_task_runner),
control_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
control_factory_(this),
desktop_pipe_(IPC::InvalidPlatformFileForTransit()),
current_size_(SkISize::Make(0, 0)),
next_shared_buffer_id_(1),
......
......@@ -207,7 +207,7 @@ RdpSession::RdpSession(
WtsTerminalMonitor* monitor)
: DesktopSessionWin(caller_task_runner, io_task_runner, daemon_process, id,
monitor),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
RdpSession::~RdpSession() {
......
......@@ -29,7 +29,7 @@ HostChangeNotificationListener::HostChangeNotificationListener(
host_id_(host_id),
signal_strategy_(signal_strategy),
directory_bot_jid_(directory_bot_jid),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
DCHECK(signal_strategy_);
signal_strategy_->AddListener(this);
......
......@@ -95,7 +95,7 @@ HostWindowProxy::Core::Core(
: caller_task_runner_(caller_task_runner),
ui_task_runner_(ui_task_runner),
host_window_(host_window.Pass()),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
weak_factory_(this) {
DCHECK(caller_task_runner->BelongsToCurrentThread());
}
......
......@@ -12,7 +12,7 @@ namespace remoting {
IpcAudioCapturer::IpcAudioCapturer(
scoped_refptr<DesktopSessionProxy> desktop_session_proxy)
: desktop_session_proxy_(desktop_session_proxy),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
weak_factory_(this) {
}
IpcAudioCapturer::~IpcAudioCapturer() {
......
......@@ -80,7 +80,7 @@ IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory(
io_task_runner_(io_task_runner),
curtain_activated_(false),
daemon_channel_(daemon_channel),
connector_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
connector_factory_(this),
next_id_(0) {
}
......
......@@ -14,7 +14,7 @@ IpcVideoFrameCapturer::IpcVideoFrameCapturer(
scoped_refptr<DesktopSessionProxy> desktop_session_proxy)
: delegate_(NULL),
desktop_session_proxy_(desktop_session_proxy),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
weak_factory_(this) {
}
IpcVideoFrameCapturer::~IpcVideoFrameCapturer() {
......
......@@ -655,7 +655,7 @@ HostNPScriptObject::HostNPScriptObject(
am_currently_logging_(false),
state_(kDisconnected),
daemon_controller_(DaemonController::Create()),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
weak_factory_(this),
weak_ptr_(weak_factory_.GetWeakPtr()) {
DCHECK(plugin_task_runner_->BelongsToCurrentThread());
......
......@@ -106,7 +106,7 @@ PolicyWatcher::PolicyWatcher(
: task_runner_(task_runner),
old_policies_(new base::DictionaryValue()),
default_values_(new base::DictionaryValue()),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
// Initialize the default values for each policy.
default_values_->SetBoolean(kNatPolicyName, true);
default_values_->SetBoolean(kHostRequireTwoFactorPolicyName, false);
......
......@@ -50,7 +50,7 @@ class PolicyWatcherLinux : public PolicyWatcher {
const base::FilePath& config_dir)
: PolicyWatcher(task_runner),
config_dir_(config_dir),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
// Detach the factory because we ensure that only the policy thread ever
// calls methods on this. Also, the API contract of having to call
// StopWatching() (which signals completion) after StartWatching()
......
......@@ -303,7 +303,7 @@ HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context,
#if defined(REMOTING_MULTI_PROCESS)
desktop_session_connector_(NULL),
#endif // defined(REMOTING_MULTI_PROCESS)
ALLOW_THIS_IN_INITIALIZER_LIST(self_(this)),
self_(this),
exit_code_out_(exit_code_out) {
// Create the platform-specific curtain-mode implementation.
// TODO(wez): Create this on the network thread?
......
......@@ -113,13 +113,12 @@ DaemonComInstallerWin::DaemonComInstallerWin(
const CompletionCallback& done)
: DaemonInstallerWin(done),
update3_(update3),
ALLOW_THIS_IN_INITIALIZER_LIST(
polling_timer_(
FROM_HERE,
base::TimeDelta::FromMilliseconds(kOmahaPollIntervalMs),
base::Bind(&DaemonComInstallerWin::PollInstallationStatus,
base::Unretained(this)),
false)) {
polling_timer_(
FROM_HERE,
base::TimeDelta::FromMilliseconds(kOmahaPollIntervalMs),
base::Bind(&DaemonComInstallerWin::PollInstallationStatus,
base::Unretained(this)),
false) {
}
void DaemonComInstallerWin::Install() {
......
......@@ -25,7 +25,7 @@ HostStarter::HostStarter(
service_client_(service_client.Pass()),
daemon_controller_(daemon_controller.Pass()),
consent_to_data_collection_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),
weak_ptr_factory_(this),
weak_ptr_(weak_ptr_factory_.GetWeakPtr()) {
main_task_runner_ = base::ThreadTaskRunnerHandle::Get();
}
......
......@@ -28,7 +28,7 @@ StartHostWindow::StartHostWindow(
consent_to_collect_data_(true),
mem_mgr_(GetProcessHeap()),
string_mgr_(&mem_mgr_),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),
weak_ptr_factory_(this),
weak_ptr_(weak_ptr_factory_.GetWeakPtr()) {
}
......
......@@ -80,7 +80,7 @@ net::ProxyConfigService* CreateSystemProxyConfigService(
// which is in turn copied from some test code. Move it somewhere reusable.
URLRequestContext::URLRequestContext(
scoped_ptr<net::ProxyConfigService> proxy_config_service)
: ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
: storage_(this) {
scoped_ptr<VlogNetLog> net_log(new VlogNetLog());
storage_.set_host_resolver(
net::HostResolver::CreateDefaultResolver(net_log.get()));
......
......@@ -27,7 +27,7 @@ FakeSignalStrategy::FakeSignalStrategy(const std::string& jid)
: jid_(jid),
peer_(NULL),
last_id_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
......
......@@ -358,7 +358,7 @@ ChannelMultiplexer::ChannelMultiplexer(ChannelFactory* factory,
: base_channel_factory_(factory),
base_channel_name_(base_channel_name),
next_channel_id_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
ChannelMultiplexer::~ChannelMultiplexer() {
......
......@@ -20,7 +20,7 @@ FakeChannelAuthenticator::FakeChannelAuthenticator(bool accept, bool async)
async_(async),
did_read_bytes_(false),
did_write_bytes_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
FakeChannelAuthenticator::~FakeChannelAuthenticator() {
......
......@@ -27,7 +27,7 @@ FakeSocket::FakeSocket()
read_buffer_size_(0),
input_pos_(0),
message_loop_(MessageLoop::current()),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
FakeSocket::~FakeSocket() {
......@@ -279,7 +279,7 @@ FakeSession::FakeSession()
jid_(kTestJid),
error_(OK),
closed_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
FakeSession::~FakeSession() { }
......
......@@ -26,7 +26,7 @@ MessageReader::MessageReader()
read_pending_(false),
pending_messages_(0),
closed_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
weak_factory_(this) {
}
void MessageReader::Init(net::Socket* socket,
......
......@@ -28,7 +28,7 @@ NegotiatingClientAuthenticator::NegotiatingClientAuthenticator(
fetch_secret_callback_(fetch_secret_callback),
token_fetcher_(token_fetcher.Pass()),
method_set_by_host_(false),
weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
weak_factory_(this) {
DCHECK(!methods.empty());
for (std::vector<AuthenticationMethod>::const_iterator it = methods.begin();
it != methods.end(); ++it) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment