diff options
author | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 15:44:15 +0000 |
---|---|---|
committer | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 15:44:15 +0000 |
commit | d3e9b4901199d4f6bd95da99fdba6ddf9b019065 (patch) | |
tree | 2abffc3580c84053d2026d49804960aa3e957fcc /base | |
parent | 4352f70f703c920e10c9d689dcb7844b4ddf72b3 (diff) | |
download | chromium_src-d3e9b4901199d4f6bd95da99fdba6ddf9b019065.zip chromium_src-d3e9b4901199d4f6bd95da99fdba6ddf9b019065.tar.gz chromium_src-d3e9b4901199d4f6bd95da99fdba6ddf9b019065.tar.bz2 |
Enable MessageLoop unittests on iOS and fix MessagePumpIOForIOS bug.
This CL does follow-up work to https://chromiumcodereview.appspot.com/11412101/ :
1. Turns on MessageLoop unittests on iOS.
2. Fixes a bug that the |FileDescriptorWatcherOutlivesMessageLoop| test
uncovered wherein |FileDescriptorWatcher| needs to retain its pump to ensure
that it can safely call |RemoveRunLoopSource()| on the pump at destruction
if necessary.
3. Stops message_pump_libevent being built on iOS.
Review URL: https://chromiumcodereview.appspot.com/11299301
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/base.gyp | 5 | ||||
-rw-r--r-- | base/base.gypi | 3 | ||||
-rw-r--r-- | base/message_pump_io_ios.h | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/base/base.gyp b/base/base.gyp index 1ba9e43..702e437 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -618,11 +618,6 @@ ['exclude', '^metrics/stats_table_unittest\\.cc$'], # iOS does not use message_pump_libevent. ['exclude', '^message_pump_libevent_unittest\\.cc$'], - # TODO(ios): Remove these as base/ is unforked. - # For now, exclude everything that doesn't build as-is, just to get - # a minimal target building. - # Unittests that don't pass. - ['exclude', '^message_loop_unittest\\.cc$'], ], 'conditions': [ ['coverage != 0', { diff --git a/base/base.gypi b/base/base.gypi index c73ade5..5febc5a 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -642,6 +642,9 @@ ['exclude', '^process_util'], ['include', '^process_util_ios\\.mm$'], ], + 'sources!': [ + 'message_pump_libevent.cc' + ], }], ['OS != "mac" or >(nacl_untrusted_build)==1', { 'sources!': [ diff --git a/base/message_pump_io_ios.h b/base/message_pump_io_ios.h index 407c1db..81f529d 100644 --- a/base/message_pump_io_ios.h +++ b/base/message_pump_io_ios.h @@ -8,6 +8,7 @@ #include "base/base_export.h" #include "base/mac/scoped_cffiledescriptorref.h" #include "base/mac/scoped_cftyperef.h" +#include "base/memory/ref_counted.h" #include "base/message_pump_mac.h" #include "base/observer_list.h" @@ -81,7 +82,7 @@ class BASE_EXPORT MessagePumpIOSForIO : public MessagePumpNSRunLoop { base::mac::ScopedCFFileDescriptorRef fdref_; CFOptionFlags callback_types_; base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> fd_source_; - MessagePumpIOSForIO* pump_; + scoped_refptr<MessagePumpIOSForIO> pump_; Watcher* watcher_; DISALLOW_COPY_AND_ASSIGN(FileDescriptorWatcher); |