diff options
22 files changed, 76 insertions, 66 deletions
diff --git a/base/base.gyp b/base/base.gyp index 6e62c84..a86bca0 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -106,7 +106,6 @@ 'metrics/field_trial_unittest.cc', 'metrics/histogram_unittest.cc', 'metrics/stats_table_unittest.cc', - 'object_watcher_unittest.cc', 'observer_list_unittest.cc', 'path_service_unittest.cc', 'pickle_unittest.cc', @@ -167,6 +166,7 @@ 'win/event_trace_controller_unittest.cc', 'win/event_trace_provider_unittest.cc', 'win/i18n_unittest.cc', + 'win/object_watcher_unittest.cc', 'win/pe_image_unittest.cc', 'win/registry_unittest.cc', 'win/scoped_bstr_unittest.cc', @@ -224,7 +224,6 @@ ['exclude', '^win/'], ], 'sources!': [ - 'object_watcher_unittest.cc', 'system_monitor_unittest.cc', 'time_win_unittest.cc', 'trace_event_win_unittest.cc', diff --git a/base/base.gypi b/base/base.gypi index ee794fd..ce533cb 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -150,8 +150,6 @@ 'native_library_linux.cc', 'native_library_mac.mm', 'native_library_win.cc', - 'object_watcher.cc', - 'object_watcher.h', 'observer_list.h', 'observer_list_threadsafe.h', 'path_service.cc', @@ -297,6 +295,8 @@ 'weak_ptr.h', 'win/i18n.cc', 'win/i18n.h', + 'win/object_watcher.cc', + 'win/object_watcher.h', 'win/pe_image.cc', 'win/event_trace_consumer.h', 'win/event_trace_controller.cc', @@ -513,7 +513,6 @@ 'debug_on_start.cc', 'event_recorder.cc', 'file_version_info.cc', - 'object_watcher.cc', 'pe_image.cc', 'registry.cc', 'resource_util.cc', diff --git a/base/waitable_event_watcher.h b/base/waitable_event_watcher.h index 04aa8cf..c54419e 100644 --- a/base/waitable_event_watcher.h +++ b/base/waitable_event_watcher.h @@ -9,7 +9,7 @@ #include "build/build_config.h" #if defined(OS_WIN) -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" #else #include "base/message_loop.h" #include "base/waitable_event.h" @@ -124,7 +124,7 @@ class WaitableEventWatcher // called Delegate (at least on Windows). Thus this object exists to proxy // the callback function // --------------------------------------------------------------------------- - class ObjectWatcherHelper : public ObjectWatcher::Delegate { + class ObjectWatcherHelper : public win::ObjectWatcher::Delegate { public: ObjectWatcherHelper(WaitableEventWatcher* watcher); @@ -140,7 +140,7 @@ class WaitableEventWatcher void OnObjectSignaled(); ObjectWatcherHelper helper_; - ObjectWatcher watcher_; + win::ObjectWatcher watcher_; #else // --------------------------------------------------------------------------- // Implementation of MessageLoop::DestructionObserver diff --git a/base/waitable_event_watcher_win.cc b/base/waitable_event_watcher_win.cc index 7619aa4..d1fb5d2 100644 --- a/base/waitable_event_watcher_win.cc +++ b/base/waitable_event_watcher_win.cc @@ -5,8 +5,8 @@ #include "base/waitable_event_watcher.h" #include "base/compiler_specific.h" -#include "base/object_watcher.h" #include "base/waitable_event.h" +#include "base/win/object_watcher.h" namespace base { diff --git a/base/object_watcher.cc b/base/win/object_watcher.cc index a15234b..4f5e7ab 100644 --- a/base/object_watcher.cc +++ b/base/win/object_watcher.cc @@ -1,12 +1,13 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" #include "base/logging.h" namespace base { +namespace win { //----------------------------------------------------------------------------- @@ -135,4 +136,5 @@ void ObjectWatcher::WillDestroyCurrentMessageLoop() { StopWatching(); } +} // namespace win } // namespace base diff --git a/base/object_watcher.h b/base/win/object_watcher.h index e05ceac..16534c2 100644 --- a/base/object_watcher.h +++ b/base/win/object_watcher.h @@ -1,9 +1,9 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. -#ifndef BASE_OBJECT_WATCHER_H_ -#define BASE_OBJECT_WATCHER_H_ +#ifndef BASE_WIN_OBJECT_WATCHER_H_ +#define BASE_WIN_OBJECT_WATCHER_H_ #pragma once #include <windows.h> @@ -11,6 +11,7 @@ #include "base/message_loop.h" namespace base { +namespace win { // A class that provides a means to asynchronously wait for a Windows object to // become signaled. It is an abstraction around RegisterWaitForSingleObject @@ -87,6 +88,7 @@ class ObjectWatcher : public MessageLoop::DestructionObserver { DISALLOW_COPY_AND_ASSIGN(ObjectWatcher); }; +} // namespace win } // namespace base #endif // BASE_OBJECT_WATCHER_H_ diff --git a/base/object_watcher_unittest.cc b/base/win/object_watcher_unittest.cc index 3605dbb..fe151d9 100644 --- a/base/object_watcher_unittest.cc +++ b/base/win/object_watcher_unittest.cc @@ -1,23 +1,26 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. #include <process.h> #include "base/message_loop.h" -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" #include "testing/gtest/include/gtest/gtest.h" +namespace base { +namespace win { + namespace { -class QuitDelegate : public base::ObjectWatcher::Delegate { +class QuitDelegate : public ObjectWatcher::Delegate { public: virtual void OnObjectSignaled(HANDLE object) { MessageLoop::current()->Quit(); } }; -class DecrementCountDelegate : public base::ObjectWatcher::Delegate { +class DecrementCountDelegate : public ObjectWatcher::Delegate { public: explicit DecrementCountDelegate(int* counter) : counter_(counter) { } @@ -28,12 +31,10 @@ class DecrementCountDelegate : public base::ObjectWatcher::Delegate { int* counter_; }; -} // namespace - void RunTest_BasicSignal(MessageLoop::Type message_loop_type) { MessageLoop message_loop(message_loop_type); - base::ObjectWatcher watcher; + ObjectWatcher watcher; EXPECT_EQ(NULL, watcher.GetWatchedObject()); // A manual-reset event that is not yet signaled. @@ -55,7 +56,7 @@ void RunTest_BasicSignal(MessageLoop::Type message_loop_type) { void RunTest_BasicCancel(MessageLoop::Type message_loop_type) { MessageLoop message_loop(message_loop_type); - base::ObjectWatcher watcher; + ObjectWatcher watcher; // A manual-reset event that is not yet signaled. HANDLE event = CreateEvent(NULL, TRUE, FALSE, NULL); @@ -73,7 +74,7 @@ void RunTest_BasicCancel(MessageLoop::Type message_loop_type) { void RunTest_CancelAfterSet(MessageLoop::Type message_loop_type) { MessageLoop message_loop(message_loop_type); - base::ObjectWatcher watcher; + ObjectWatcher watcher; int counter = 1; DecrementCountDelegate delegate(&counter); @@ -105,7 +106,7 @@ void RunTest_OutlivesMessageLoop(MessageLoop::Type message_loop_type) { // people use the Singleton pattern or atexit. HANDLE event = CreateEvent(NULL, TRUE, FALSE, NULL); // not signaled { - base::ObjectWatcher watcher; + ObjectWatcher watcher; { MessageLoop message_loop(message_loop_type); @@ -116,6 +117,8 @@ void RunTest_OutlivesMessageLoop(MessageLoop::Type message_loop_type) { CloseHandle(event); } +} // namespace + //----------------------------------------------------------------------------- TEST(ObjectWatcherTest, BasicSignal) { @@ -141,3 +144,6 @@ TEST(ObjectWatcherTest, OutlivesMessageLoop) { RunTest_OutlivesMessageLoop(MessageLoop::TYPE_IO); RunTest_OutlivesMessageLoop(MessageLoop::TYPE_UI); } + +} // namespace win +} // namespace base diff --git a/chrome/browser/file_path_watcher/file_path_watcher_win.cc b/chrome/browser/file_path_watcher/file_path_watcher_win.cc index 57294d4..c2f49b9 100644 --- a/chrome/browser/file_path_watcher/file_path_watcher_win.cc +++ b/chrome/browser/file_path_watcher/file_path_watcher_win.cc @@ -7,14 +7,14 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/logging.h" -#include "base/object_watcher.h" #include "base/ref_counted.h" #include "base/time.h" +#include "base/win/object_watcher.h" namespace { class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate, - public base::ObjectWatcher::Delegate { + public base::win::ObjectWatcher::Delegate { public: FilePathWatcherImpl() : delegate_(NULL), handle_(INVALID_HANDLE_VALUE) {} @@ -49,7 +49,7 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate, HANDLE handle_; // ObjectWatcher to watch handle_ for events. - base::ObjectWatcher watcher_; + base::win::ObjectWatcher watcher_; // Keep track of the last modified time of the file. We use nulltime // to represent the file not existing. diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc index 995dcb2..088ee5a 100644 --- a/chrome/browser/first_run/first_run_win.cc +++ b/chrome/browser/first_run/first_run_win.cc @@ -16,13 +16,13 @@ #include "app/resource_bundle.h" #include "base/environment.h" #include "base/file_util.h" -#include "base/object_watcher.h" #include "base/path_service.h" #include "base/scoped_comptr_win.h" #include "base/scoped_ptr.h" #include "base/string_number_conversions.h" #include "base/string_split.h" #include "base/utf_string_conversions.h" +#include "base/win/object_watcher.h" #include "base/win/registry.h" #include "base/win/windows_version.h" #include "chrome/browser/extensions/extension_service.h" @@ -321,7 +321,7 @@ namespace { // process has ended and what was the result of the operation as reported by // the process exit code. This class executes in the context of the main chrome // process. -class ImportProcessRunner : public base::ObjectWatcher::Delegate { +class ImportProcessRunner : public base::win::ObjectWatcher::Delegate { public: // The constructor takes the importer process to watch and then it does a // message loop blocking wait until the process ends. This object now owns @@ -350,7 +350,7 @@ class ImportProcessRunner : public base::ObjectWatcher::Delegate { } private: - base::ObjectWatcher watcher_; + base::win::ObjectWatcher watcher_; base::ProcessHandle import_process_; DWORD exit_code_; }; diff --git a/chrome/browser/policy/configuration_policy_loader_win.h b/chrome/browser/policy/configuration_policy_loader_win.h index a898afc..65319fe 100644 --- a/chrome/browser/policy/configuration_policy_loader_win.h +++ b/chrome/browser/policy/configuration_policy_loader_win.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_LOADER_WIN_H_ #pragma once -#include "base/object_watcher.h" #include "base/waitable_event.h" +#include "base/win/object_watcher.h" #include "chrome/browser/policy/asynchronous_policy_loader.h" namespace policy { @@ -16,7 +16,7 @@ namespace policy { // reload when Group Policy changes. class ConfigurationPolicyLoaderWin : public AsynchronousPolicyLoader, - public base::ObjectWatcher::Delegate, + public base::win::ObjectWatcher::Delegate, public MessageLoop::DestructionObserver { public: ConfigurationPolicyLoaderWin( @@ -44,8 +44,8 @@ class ConfigurationPolicyLoaderWin base::WaitableEvent user_policy_changed_event_; base::WaitableEvent machine_policy_changed_event_; - base::ObjectWatcher user_policy_watcher_; - base::ObjectWatcher machine_policy_watcher_; + base::win::ObjectWatcher user_policy_watcher_; + base::win::ObjectWatcher machine_policy_watcher_; bool user_policy_watcher_failed_; bool machine_policy_watcher_failed_; diff --git a/chrome/common/process_watcher_win.cc b/chrome/common/process_watcher_win.cc index 210b3d5..3378960 100644 --- a/chrome/common/process_watcher_win.cc +++ b/chrome/common/process_watcher_win.cc @@ -7,7 +7,7 @@ #include "base/scoped_ptr.h" #include "base/environment.h" #include "base/message_loop.h" -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" #include "chrome/common/env_vars.h" #include "chrome/common/result_codes.h" @@ -16,7 +16,8 @@ static const int kWaitInterval = 2000; namespace { -class TimerExpiredTask : public Task, public base::ObjectWatcher::Delegate { +class TimerExpiredTask : public Task, + public base::win::ObjectWatcher::Delegate { public: explicit TimerExpiredTask(base::ProcessHandle process) : process_(process) { watcher_.StartWatching(process_, this); @@ -72,7 +73,7 @@ class TimerExpiredTask : public Task, public base::ObjectWatcher::Delegate { // The process that we are watching. base::ProcessHandle process_; - base::ObjectWatcher watcher_; + base::win::ObjectWatcher watcher_; DISALLOW_COPY_AND_ASSIGN(TimerExpiredTask); }; diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc index 3e03285..d30e696 100644 --- a/chrome/common/service_process_util_win.cc +++ b/chrome/common/service_process_util_win.cc @@ -7,11 +7,11 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/logging.h" -#include "base/object_watcher.h" #include "base/path_service.h" #include "base/scoped_handle_win.h" #include "base/string16.h" #include "base/utf_string_conversions.h" +#include "base/win/object_watcher.h" #include "base/win/win_util.h" #include "chrome/common/chrome_switches.h" @@ -27,7 +27,8 @@ string16 GetServiceProcessShutdownEventName() { GetServiceProcessScopedVersionedName("_service_shutdown_evt")); } -class ServiceProcessShutdownMonitor : public base::ObjectWatcher::Delegate { +class ServiceProcessShutdownMonitor + : public base::win::ObjectWatcher::Delegate { public: explicit ServiceProcessShutdownMonitor(Task* shutdown_task) : shutdown_task_(shutdown_task) { @@ -47,7 +48,7 @@ class ServiceProcessShutdownMonitor : public base::ObjectWatcher::Delegate { private: ScopedHandle shutdown_event_; - base::ObjectWatcher watcher_; + base::win::ObjectWatcher watcher_; scoped_ptr<Task> shutdown_task_; }; diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc index 8d92e3dfb..d77217f 100644 --- a/chrome/service/cloud_print/print_system_win.cc +++ b/chrome/service/cloud_print/print_system_win.cc @@ -8,9 +8,9 @@ #include <winspool.h> #include "base/file_path.h" -#include "base/object_watcher.h" #include "base/scoped_ptr.h" #include "base/utf_string_conversions.h" +#include "base/win/object_watcher.h" #include "base/win/scoped_bstr.h" #include "base/win/scoped_comptr.h" #include "base/win/scoped_hdc.h" @@ -110,8 +110,7 @@ HRESULT PrintTicketToDevMode(const std::string& printer_name, namespace cloud_print { -class PrintSystemWatcherWin - : public base::ObjectWatcher::Delegate { +class PrintSystemWatcherWin : public base::win::ObjectWatcher::Delegate { public: PrintSystemWatcherWin() : printer_(NULL), @@ -224,7 +223,7 @@ class PrintSystemWatcherWin } private: - base::ObjectWatcher watcher_; + base::win::ObjectWatcher watcher_; HANDLE printer_; // The printer being watched HANDLE printer_change_; // Returned by FindFirstPrinterChangeNotifier Delegate* delegate_; // Delegate to notify diff --git a/chrome_frame/test/win_event_receiver.cc b/chrome_frame/test/win_event_receiver.cc index b05d807..a187556 100644 --- a/chrome_frame/test/win_event_receiver.cc +++ b/chrome_frame/test/win_event_receiver.cc @@ -6,7 +6,7 @@ #include "base/logging.h" #include "base/message_loop.h" -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" #include "base/string_util.h" #include "chrome_frame/function_stub.h" @@ -78,7 +78,7 @@ void WinEventReceiver::WinEventHook(WinEventReceiver* me, HWINEVENTHOOK hook, // Notification is always delivered via a message loop task in the message loop // that is active when the instance is constructed. class WindowWatchdog::ProcessExitObserver - : public base::ObjectWatcher::Delegate { + : public base::win::ObjectWatcher::Delegate { public: // Initiates the process watch. Will always return without notifying the // watchdog. @@ -94,7 +94,7 @@ class WindowWatchdog::ProcessExitObserver HWND hwnd_; ScopedRunnableMethodFactory<ProcessExitObserver> method_task_factory_; - base::ObjectWatcher object_watcher_; + base::win::ObjectWatcher object_watcher_; DISALLOW_COPY_AND_ASSIGN(ProcessExitObserver); }; diff --git a/chrome_frame/test/win_event_receiver.h b/chrome_frame/test/win_event_receiver.h index 7a191e50..9d413de 100644 --- a/chrome_frame/test/win_event_receiver.h +++ b/chrome_frame/test/win_event_receiver.h @@ -12,7 +12,7 @@ #include <utility> #include "base/linked_ptr.h" -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" struct FunctionStub; @@ -106,8 +106,8 @@ class WindowWatchdog : public WinEventListener { // The Delegate object is actually a ProcessExitObserver, but declaring // it as such would require fully declaring the ProcessExitObserver class // here in order for linked_ptr to access its destructor. - typedef std::pair<HWND, linked_ptr<base::ObjectWatcher::Delegate> > - OpenWindowEntry; + typedef std::pair<HWND, linked_ptr<base::win::ObjectWatcher::Delegate> > + OpenWindowEntry; typedef std::vector<OpenWindowEntry> OpenWindowList; struct ObserverEntry { @@ -121,7 +121,7 @@ class WindowWatchdog : public WinEventListener { // WinEventListener implementation. virtual void OnEventReceived( - DWORD event, HWND hwnd, LONG object_id, LONG child_id); + DWORD event, HWND hwnd, LONG object_id, LONG child_id); static std::string GetWindowCaption(HWND hwnd); diff --git a/jingle/notifier/base/chrome_async_socket.cc b/jingle/notifier/base/chrome_async_socket.cc index 198f7db..f3a5a77 100644 --- a/jingle/notifier/base/chrome_async_socket.cc +++ b/jingle/notifier/base/chrome_async_socket.cc @@ -17,6 +17,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/logging.h" +#include "base/message_loop.h" #include "net/base/address_list.h" #include "net/base/host_port_pair.h" #include "net/base/io_buffer.h" diff --git a/net/base/listen_socket.h b/net/base/listen_socket.h index e730b82..641ae51 100644 --- a/net/base/listen_socket.h +++ b/net/base/listen_socket.h @@ -19,7 +19,7 @@ #endif #include <string> #if defined(OS_WIN) -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" #elif defined(OS_POSIX) #include "base/message_loop.h" #endif @@ -35,7 +35,7 @@ typedef int SOCKET; // Implements a raw socket interface class ListenSocket : public base::RefCountedThreadSafe<ListenSocket>, #if defined(OS_WIN) - public base::ObjectWatcher::Delegate + public base::win::ObjectWatcher::Delegate #elif defined(OS_POSIX) public MessageLoopForIO::Watcher #endif @@ -107,7 +107,7 @@ class ListenSocket : public base::RefCountedThreadSafe<ListenSocket>, #if defined(OS_WIN) // ObjectWatcher delegate virtual void OnObjectSignaled(HANDLE object); - base::ObjectWatcher watcher_; + base::win::ObjectWatcher watcher_; HANDLE socket_event_; #elif defined(OS_POSIX) WaitState wait_state_; diff --git a/net/base/network_change_notifier_win.h b/net/base/network_change_notifier_win.h index 44782c7..c76f7fd 100644 --- a/net/base/network_change_notifier_win.h +++ b/net/base/network_change_notifier_win.h @@ -9,13 +9,13 @@ #include <windows.h> #include "base/basictypes.h" -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" #include "net/base/network_change_notifier.h" namespace net { class NetworkChangeNotifierWin : public NetworkChangeNotifier, - public base::ObjectWatcher::Delegate { + public base::win::ObjectWatcher::Delegate { public: NetworkChangeNotifierWin(); @@ -31,7 +31,7 @@ class NetworkChangeNotifierWin : public NetworkChangeNotifier, // Begins listening for a single subsequent address change. void WatchForAddressChange(); - base::ObjectWatcher addr_watcher_; + base::win::ObjectWatcher addr_watcher_; OVERLAPPED addr_overlapped_; DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierWin); diff --git a/net/proxy/proxy_config_service_win.cc b/net/proxy/proxy_config_service_win.cc index 914a319..849fc24 100644 --- a/net/proxy/proxy_config_service_win.cc +++ b/net/proxy/proxy_config_service_win.cc @@ -39,7 +39,7 @@ void FreeIEConfig(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG* ie_config) { // RegKey and ObjectWatcher pair. class ProxyConfigServiceWin::KeyEntry { public: - bool StartWatching(base::ObjectWatcher::Delegate* delegate) { + bool StartWatching(base::win::ObjectWatcher::Delegate* delegate) { // Try to create a watch event for the registry key (which watches the // sibling tree as well). if (!key_.StartWatching()) @@ -63,7 +63,7 @@ class ProxyConfigServiceWin::KeyEntry { private: base::win::RegKey key_; - base::ObjectWatcher watcher_; + base::win::ObjectWatcher watcher_; }; ProxyConfigServiceWin::ProxyConfigServiceWin() diff --git a/net/proxy/proxy_config_service_win.h b/net/proxy/proxy_config_service_win.h index e10e9a0..dc1da12 100644 --- a/net/proxy/proxy_config_service_win.h +++ b/net/proxy/proxy_config_service_win.h @@ -12,7 +12,7 @@ #include <vector> #include "base/gtest_prod_util.h" -#include "base/object_watcher.h" +#include "base/win/object_watcher.h" #include "net/proxy/polling_proxy_config_service.h" namespace net { @@ -40,7 +40,7 @@ namespace net { // change, or in case we got it wrong (and are not checking all possible // registry dependencies). class ProxyConfigServiceWin : public PollingProxyConfigService, - public base::ObjectWatcher::Delegate { + public base::win::ObjectWatcher::Delegate { public: ProxyConfigServiceWin(); virtual ~ProxyConfigServiceWin(); diff --git a/net/socket/tcp_client_socket_win.cc b/net/socket/tcp_client_socket_win.cc index a1d99e6..e8b2f53 100644 --- a/net/socket/tcp_client_socket_win.cc +++ b/net/socket/tcp_client_socket_win.cc @@ -10,6 +10,7 @@ #include "base/metrics/stats_counters.h" #include "base/string_util.h" #include "base/sys_info.h" +#include "base/win/object_watcher.h" #include "net/base/address_list_net_log_param.h" #include "net/base/connection_type_histograms.h" #include "net/base/io_buffer.h" @@ -170,7 +171,7 @@ class TCPClientSocketWin::Core : public base::RefCounted<Core> { private: friend class base::RefCounted<Core>; - class ReadDelegate : public base::ObjectWatcher::Delegate { + class ReadDelegate : public base::win::ObjectWatcher::Delegate { public: explicit ReadDelegate(Core* core) : core_(core) {} virtual ~ReadDelegate() {} @@ -182,7 +183,7 @@ class TCPClientSocketWin::Core : public base::RefCounted<Core> { Core* const core_; }; - class WriteDelegate : public base::ObjectWatcher::Delegate { + class WriteDelegate : public base::win::ObjectWatcher::Delegate { public: explicit WriteDelegate(Core* core) : core_(core) {} virtual ~WriteDelegate() {} @@ -205,9 +206,9 @@ class TCPClientSocketWin::Core : public base::RefCounted<Core> { WriteDelegate writer_; // |read_watcher_| watches for events from Connect() and Read(). - base::ObjectWatcher read_watcher_; + base::win::ObjectWatcher read_watcher_; // |write_watcher_| watches for events from Write(); - base::ObjectWatcher write_watcher_; + base::win::ObjectWatcher write_watcher_; // When doing reads from the socket, we try to mirror TCP's slow start. // We do this because otherwise the async IO subsystem artifically delays diff --git a/net/socket/tcp_client_socket_win.h b/net/socket/tcp_client_socket_win.h index 041c123..aa8abd1 100644 --- a/net/socket/tcp_client_socket_win.h +++ b/net/socket/tcp_client_socket_win.h @@ -8,7 +8,6 @@ #include <winsock2.h> -#include "base/object_watcher.h" #include "base/threading/non_thread_safe.h" #include "net/base/address_list.h" #include "net/base/completion_callback.h" |