| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/proxy/proxy_config_service_linux.h" | 5 #include "net/proxy/proxy_config_service_linux.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #if defined(USE_GCONF) | 9 #if defined(USE_GCONF) |
| 10 #include <gconf/gconf-client.h> | 10 #include <gconf/gconf-client.h> |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 base::MessageLoopForIO::WATCH_READ, | 967 base::MessageLoopForIO::WATCH_READ, |
| 968 &inotify_watcher_, | 968 &inotify_watcher_, |
| 969 this)) | 969 this)) |
| 970 return false; | 970 return false; |
| 971 // Simulate a change to avoid possibly losing updates before this point. | 971 // Simulate a change to avoid possibly losing updates before this point. |
| 972 OnChangeNotification(); | 972 OnChangeNotification(); |
| 973 return true; | 973 return true; |
| 974 } | 974 } |
| 975 | 975 |
| 976 virtual base::SingleThreadTaskRunner* GetNotificationTaskRunner() OVERRIDE { | 976 virtual base::SingleThreadTaskRunner* GetNotificationTaskRunner() OVERRIDE { |
| 977 return file_loop_ ? file_loop_->message_loop_proxy() : NULL; | 977 return file_loop_ ? file_loop_->message_loop_proxy().get() : NULL; |
| 978 } | 978 } |
| 979 | 979 |
| 980 // Implement base::MessagePumpLibevent::Watcher. | 980 // Implement base::MessagePumpLibevent::Watcher. |
| 981 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE { | 981 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE { |
| 982 DCHECK_EQ(fd, inotify_fd_); | 982 DCHECK_EQ(fd, inotify_fd_); |
| 983 DCHECK(base::MessageLoop::current() == file_loop_); | 983 DCHECK(base::MessageLoop::current() == file_loop_); |
| 984 OnChangeNotification(); | 984 OnChangeNotification(); |
| 985 } | 985 } |
| 986 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE { | 986 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE { |
| 987 NOTREACHED(); | 987 NOTREACHED(); |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { | 1757 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { |
| 1758 delegate_->RemoveObserver(observer); | 1758 delegate_->RemoveObserver(observer); |
| 1759 } | 1759 } |
| 1760 | 1760 |
| 1761 ProxyConfigService::ConfigAvailability | 1761 ProxyConfigService::ConfigAvailability |
| 1762 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { | 1762 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { |
| 1763 return delegate_->GetLatestProxyConfig(config); | 1763 return delegate_->GetLatestProxyConfig(config); |
| 1764 } | 1764 } |
| 1765 | 1765 |
| 1766 } // namespace net | 1766 } // namespace net |
| OLD | NEW |