diff options
author | torne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-08 12:56:26 +0000 |
---|---|---|
committer | torne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-08 12:56:26 +0000 |
commit | 1a64c31010fa61fa92593b52d7063a4d6188c4a8 (patch) | |
tree | 3e184adee4a39dcbc03d1f21a1bf2bf017b992b3 /android_webview/browser/aw_quota_manager_bridge.h | |
parent | c1049d02b308da4636b46ba7aa47e9ebae3fde29 (diff) | |
download | chromium_src-1a64c31010fa61fa92593b52d7063a4d6188c4a8.zip chromium_src-1a64c31010fa61fa92593b52d7063a4d6188c4a8.tar.gz chromium_src-1a64c31010fa61fa92593b52d7063a4d6188c4a8.tar.bz2 |
Android WebView: post QuotaManager calls to UI thread.
The AwQuotaManagerBridge needs to be usable from any thread, not just
the UI thread. Make it refcounted and have its methods post to the UI
thread if not already there. Since none of the methods are synchronous
there's no need to wait for the posted messages to be handled.
BUG=305205
R=benm@chromium.org
Review URL: https://codereview.chromium.org/26477002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/browser/aw_quota_manager_bridge.h')
-rw-r--r-- | android_webview/browser/aw_quota_manager_bridge.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/android_webview/browser/aw_quota_manager_bridge.h b/android_webview/browser/aw_quota_manager_bridge.h index 5480cf8..bc4da37 100644 --- a/android_webview/browser/aw_quota_manager_bridge.h +++ b/android_webview/browser/aw_quota_manager_bridge.h @@ -5,11 +5,16 @@ #ifndef ANDROID_WEBVIEW_BROWSER_AW_QUOTA_MANAGER_BRIDGE_H_ #define ANDROID_WEBVIEW_BROWSER_AW_QUOTA_MANAGER_BRIDGE_H_ +#include "base/memory/ref_counted.h" + namespace android_webview { -// Empty base class so this can be owned and destroyed by AwBrowserContext. -class AwQuotaManagerBridge { - public: +// Empty base class so this can be refcounted by AwBrowserContext. +class AwQuotaManagerBridge : + public base::RefCountedThreadSafe<AwQuotaManagerBridge> { + protected: + friend class base::RefCountedThreadSafe<AwQuotaManagerBridge>; + AwQuotaManagerBridge(); virtual ~AwQuotaManagerBridge(); }; |