1. Create ApiFunction, which is a new base class of AsyncApiFunction that is intended to do all its work on the UI thread. Motivation is Notification API.
2. While refactoring AsyncApiFunction, get rid of DeprecatedExtractSrcId().
3. Notice that in the process of migrating usb_api.cc to the non-deprecated ExtractSrcId(), USB tests broke. Wonder why that is, because the new code is exactly like Socket/Serial's usage of ExtractSrcId().
4. Realize that Socket/Serial have stopped using ApiResourceEventNotifier long, long ago (probably when Peng refactored the callback design), and that ExtractSrcId() broke when Antony and I refactored the JSON compiler into the IDL compiler (by which point nobody was using ExtractSrcId() anymore). It's also possible that I cargo-culted my own code from Socket into Serial, where it languished unused.
5. After discussion with Antony, fix ExtractSrcId() by making srcId explicit in the IDL.
6. Remove all traces of src_id and event_notifier in serial/socket.
7. Remove the original introduction of ApiFunction and submit this CL on its own.
Review URL: https://chromiumcodereview.appspot.com/11088044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161237 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/api/socket/socket.h b/chrome/browser/extensions/api/socket/socket.h
index 404b064..aa523ed 100644
--- a/chrome/browser/extensions/api/socket/socket.h
+++ b/chrome/browser/extensions/api/socket/socket.h
@@ -93,8 +93,7 @@
int* port);
protected:
- Socket(const std::string& owner_extension_id_,
- ApiResourceEventNotifier* event_notifier);
+ explicit Socket(const std::string& owner_extension_id_);
void WriteData();
virtual int WriteImpl(net::IOBuffer* io_buffer,