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

Unified Diff: chrome/browser/services/gcm/gcm_driver.h

Issue 292813007: Remove dependency on content::BrowserThread from GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use SequencedTaskRunner Created 6 years, 7 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: chrome/browser/services/gcm/gcm_driver.h
diff --git a/chrome/browser/services/gcm/gcm_driver.h b/chrome/browser/services/gcm/gcm_driver.h
index 9db2d66f165fd44e177645b97c6a40b9426308ea..3e4f5cd1243486f33ed0b100e68cf748bf4aebbb 100644
--- a/chrome/browser/services/gcm/gcm_driver.h
+++ b/chrome/browser/services/gcm/gcm_driver.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/gcm_driver/default_gcm_app_handler.h"
@@ -20,6 +21,7 @@
namespace base {
class FilePath;
+class SequencedTaskRunner;
}
namespace extensions {
@@ -47,10 +49,14 @@ class GCMDriver : public IdentityProvider::Observer {
typedef base::Callback<void(const GCMClient::GCMStatistics& stats)>
GetGCMStatisticsCallback;
- GCMDriver(scoped_ptr<GCMClientFactory> gcm_client_factory,
- scoped_ptr<IdentityProvider> identity_provider,
- const base::FilePath& store_path,
- const scoped_refptr<net::URLRequestContextGetter>& request_context);
+ GCMDriver(
+ scoped_ptr<GCMClientFactory> gcm_client_factory,
+ scoped_ptr<IdentityProvider> identity_provider,
+ const base::FilePath& store_path,
+ const scoped_refptr<net::URLRequestContextGetter>& request_context,
+ const scoped_refptr<base::SequencedTaskRunner>& ui_thread,
+ const scoped_refptr<base::SequencedTaskRunner>& io_thread,
+ const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner);
virtual ~GCMDriver();
// Enables/disables GCM service.
@@ -187,6 +193,8 @@ class GCMDriver : public IdentityProvider::Observer {
std::string account_id_;
scoped_ptr<IdentityProvider> identity_provider_;
+ scoped_refptr<base::SequencedTaskRunner> ui_thread_;
+ scoped_refptr<base::SequencedTaskRunner> io_thread_;
scoped_ptr<DelayedTaskController> delayed_task_controller_;

Powered by Google App Engine
This is Rietveld 408576698