Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*"
Linux fixes
BUG=110610
TBR=darin
Review URL: https://chromiumcodereview.appspot.com/15829004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203535 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc
index b735a92b..d17dc353 100644
--- a/net/proxy/proxy_config_service_linux.cc
+++ b/net/proxy/proxy_config_service_linux.cc
@@ -234,7 +234,7 @@
base::MessageLoopForIO* file_loop) OVERRIDE {
DCHECK(glib_thread_task_runner->BelongsToCurrentThread());
DCHECK(!client_);
- DCHECK(!task_runner_);
+ DCHECK(!task_runner_.get());
task_runner_ = glib_thread_task_runner;
client_ = gconf_client_get_default();
if (!client_) {
@@ -317,7 +317,7 @@
}
virtual base::SingleThreadTaskRunner* GetNotificationTaskRunner() OVERRIDE {
- return task_runner_;
+ return task_runner_.get();
}
virtual ProxyConfigSource GetConfigSource() OVERRIDE {
@@ -562,7 +562,7 @@
base::MessageLoopForIO* file_loop) OVERRIDE {
DCHECK(glib_thread_task_runner->BelongsToCurrentThread());
DCHECK(!client_);
- DCHECK(!task_runner_);
+ DCHECK(!task_runner_.get());
if (!SchemaExists("org.gnome.system.proxy") ||
!(client_ = libgio_loader_.g_settings_new("org.gnome.system.proxy"))) {
@@ -619,7 +619,7 @@
}
virtual base::SingleThreadTaskRunner* GetNotificationTaskRunner() OVERRIDE {
- return task_runner_;
+ return task_runner_.get();
}
virtual ProxyConfigSource GetConfigSource() OVERRIDE {
@@ -1562,7 +1562,7 @@
// then we don't set up proxy setting change notifications. This
// should not be the usual case but is intended to simplify test
// setups.
- if (!io_thread_task_runner_ || !file_loop)
+ if (!io_thread_task_runner_.get() || !file_loop)
VLOG(1) << "Monitoring of proxy setting changes is disabled";
// Fetch and cache the current proxy config. The config is left in
@@ -1607,7 +1607,7 @@
if (io_thread_task_runner && file_loop) {
scoped_refptr<base::SingleThreadTaskRunner> required_loop =
setting_getter_->GetNotificationTaskRunner();
- if (!required_loop || required_loop->BelongsToCurrentThread()) {
+ if (!required_loop.get() || required_loop->BelongsToCurrentThread()) {
// In this case we are already on an acceptable thread.
SetUpNotifications();
} else {
@@ -1636,7 +1636,7 @@
void ProxyConfigServiceLinux::Delegate::SetUpNotifications() {
scoped_refptr<base::SingleThreadTaskRunner> required_loop =
setting_getter_->GetNotificationTaskRunner();
- DCHECK(!required_loop || required_loop->BelongsToCurrentThread());
+ DCHECK(!required_loop.get() || required_loop->BelongsToCurrentThread());
if (!setting_getter_->SetUpNotifications(this))
LOG(ERROR) << "Unable to set up proxy configuration change notifications";
}
@@ -1653,7 +1653,7 @@
ProxyConfigServiceLinux::Delegate::GetLatestProxyConfig(
ProxyConfig* config) {
// This is called from the IO thread.
- DCHECK(!io_thread_task_runner_ ||
+ DCHECK(!io_thread_task_runner_.get() ||
io_thread_task_runner_->BelongsToCurrentThread());
// Simply return the last proxy configuration that glib_default_loop
@@ -1678,7 +1678,7 @@
void ProxyConfigServiceLinux::Delegate::OnCheckProxyConfigSettings() {
scoped_refptr<base::SingleThreadTaskRunner> required_loop =
setting_getter_->GetNotificationTaskRunner();
- DCHECK(!required_loop || required_loop->BelongsToCurrentThread());
+ DCHECK(!required_loop.get() || required_loop->BelongsToCurrentThread());
ProxyConfig new_config;
bool valid = GetConfigFromSettings(&new_config);
if (valid)
@@ -1714,7 +1714,7 @@
return;
scoped_refptr<base::SingleThreadTaskRunner> shutdown_loop =
setting_getter_->GetNotificationTaskRunner();
- if (!shutdown_loop || shutdown_loop->BelongsToCurrentThread()) {
+ if (!shutdown_loop.get() || shutdown_loop->BelongsToCurrentThread()) {
// Already on the right thread, call directly.
// This is the case for the unittests.
OnDestroy();
@@ -1728,7 +1728,7 @@
void ProxyConfigServiceLinux::Delegate::OnDestroy() {
scoped_refptr<base::SingleThreadTaskRunner> shutdown_loop =
setting_getter_->GetNotificationTaskRunner();
- DCHECK(!shutdown_loop || shutdown_loop->BelongsToCurrentThread());
+ DCHECK(!shutdown_loop.get() || shutdown_loop->BelongsToCurrentThread());
setting_getter_->ShutDown();
}