summaryrefslogtreecommitdiffstats
path: root/chrome/browser/services
diff options
context:
space:
mode:
authorjianli <jianli@chromium.org>2014-09-18 12:33:59 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-18 19:34:17 +0000
commit3c23f4a188e171998f3042ad62f4aa5717e66d63 (patch)
tree804ae61bd1098e97dcdd55f5c2ae5a8712e8c547 /chrome/browser/services
parent9065985da2ce2a4f73150ac5eabab29c5d67505d (diff)
downloadchromium_src-3c23f4a188e171998f3042ad62f4aa5717e66d63.zip
chromium_src-3c23f4a188e171998f3042ad62f4aa5717e66d63.tar.gz
chromium_src-3c23f4a188e171998f3042ad62f4aa5717e66d63.tar.bz2
Add GCMChannelStatusSyncer to schedule requests and enable/disable GCM
BUG=384041 TEST=new tests added Review URL: https://codereview.chromium.org/561943002 Cr-Commit-Position: refs/heads/master@{#295524}
Diffstat (limited to 'chrome/browser/services')
-rw-r--r--chrome/browser/services/gcm/gcm_desktop_utils.cc2
-rw-r--r--chrome/browser/services/gcm/gcm_desktop_utils.h2
-rw-r--r--chrome/browser/services/gcm/gcm_profile_service.cc1
3 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/services/gcm/gcm_desktop_utils.cc b/chrome/browser/services/gcm/gcm_desktop_utils.cc
index 7e81c8d..9de629b 100644
--- a/chrome/browser/services/gcm/gcm_desktop_utils.cc
+++ b/chrome/browser/services/gcm/gcm_desktop_utils.cc
@@ -73,6 +73,7 @@ GCMClient::ChromeBuildInfo GetChromeBuildInfo() {
scoped_ptr<GCMDriver> CreateGCMDriverDesktop(
scoped_ptr<GCMClientFactory> gcm_client_factory,
+ PrefService* prefs,
const base::FilePath& store_path,
const scoped_refptr<net::URLRequestContextGetter>& request_context) {
scoped_refptr<base::SequencedWorkerPool> worker_pool(
@@ -84,6 +85,7 @@ scoped_ptr<GCMDriver> CreateGCMDriverDesktop(
return scoped_ptr<GCMDriver>(new GCMDriverDesktop(
gcm_client_factory.Pass(),
GetChromeBuildInfo(),
+ prefs,
store_path,
request_context,
content::BrowserThread::GetMessageLoopProxyForThread(
diff --git a/chrome/browser/services/gcm/gcm_desktop_utils.h b/chrome/browser/services/gcm/gcm_desktop_utils.h
index c882005..8105829 100644
--- a/chrome/browser/services/gcm/gcm_desktop_utils.h
+++ b/chrome/browser/services/gcm/gcm_desktop_utils.h
@@ -8,6 +8,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+class PrefService;
namespace base {
class FilePath;
}
@@ -23,6 +24,7 @@ class GCMClientFactory;
scoped_ptr<GCMDriver> CreateGCMDriverDesktop(
scoped_ptr<GCMClientFactory> gcm_client_factory,
+ PrefService* prefs,
const base::FilePath& store_path,
const scoped_refptr<net::URLRequestContextGetter>& request_context);
diff --git a/chrome/browser/services/gcm/gcm_profile_service.cc b/chrome/browser/services/gcm/gcm_profile_service.cc
index 5324ffd..75e1bdd 100644
--- a/chrome/browser/services/gcm/gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service.cc
@@ -169,6 +169,7 @@ GCMProfileService::GCMProfileService(
driver_ = CreateGCMDriverDesktop(
gcm_client_factory.Pass(),
+ profile_->GetPrefs(),
profile_->GetPath().Append(chrome::kGCMStoreDirname),
profile_->GetRequestContext());