Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: trunk/src/extensions/browser/api/api_resource_manager.h

Issue 227493006: Revert 262175 "* Replace "read" method with onReceiveXxx events." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: trunk/src/extensions/browser/api/api_resource_manager.h
===================================================================
--- trunk/src/extensions/browser/api/api_resource_manager.h (revision 262179)
+++ trunk/src/extensions/browser/api/api_resource_manager.h (working copy)
@@ -25,8 +25,6 @@
namespace extensions {
namespace api {
-class BluetoothSocketApiFunction;
-class BluetoothSocketEventDispatcher;
class SerialEventDispatcher;
}
@@ -154,9 +152,6 @@
private:
// TODO(rockot): ApiResourceData could be moved out of ApiResourceManager and
// we could avoid maintaining a friends list here.
- friend class BluetoothAPI;
- friend class api::BluetoothSocketApiFunction;
- friend class api::BluetoothSocketEventDispatcher;
friend class api::SerialEventDispatcher;
friend class core_api::TCPServerSocketEventDispatcher;
friend class core_api::TCPSocketEventDispatcher;
@@ -220,38 +215,26 @@
}
void InitiateExtensionUnloadedCleanup(const std::string& extension_id) {
- if (content::BrowserThread::CurrentlyOn(thread_id_)) {
- CleanupResourcesFromUnloadedExtension(extension_id);
- } else {
- content::BrowserThread::PostTask(
- thread_id_,
- FROM_HERE,
- base::Bind(&ApiResourceData::CleanupResourcesFromUnloadedExtension,
- this,
- extension_id));
- }
+ content::BrowserThread::PostTask(
+ thread_id_,
+ FROM_HERE,
+ base::Bind(&ApiResourceData::CleanupResourcesFromUnloadedExtension,
+ this,
+ extension_id));
}
void InitiateExtensionSuspendedCleanup(const std::string& extension_id) {
- if (content::BrowserThread::CurrentlyOn(thread_id_)) {
- CleanupResourcesFromSuspendedExtension(extension_id);
- } else {
- content::BrowserThread::PostTask(
- thread_id_,
- FROM_HERE,
- base::Bind(&ApiResourceData::CleanupResourcesFromSuspendedExtension,
- this,
- extension_id));
- }
+ content::BrowserThread::PostTask(
+ thread_id_,
+ FROM_HERE,
+ base::Bind(&ApiResourceData::CleanupResourcesFromSuspendedExtension,
+ this,
+ extension_id));
}
void InititateCleanup() {
- if (content::BrowserThread::CurrentlyOn(thread_id_)) {
- Cleanup();
- } else {
- content::BrowserThread::PostTask(
- thread_id_, FROM_HERE, base::Bind(&ApiResourceData::Cleanup, this));
- }
+ content::BrowserThread::PostTask(
+ thread_id_, FROM_HERE, base::Bind(&ApiResourceData::Cleanup, this));
}
private:
« no previous file with comments | « trunk/src/device/bluetooth/test/mock_bluetooth_socket.h ('k') | trunk/src/extensions/browser/api/async_api_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698