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

Unified Diff: chrome/browser/extensions/extension_gcm_app_handler_unittest.cc

Issue 286213003: Make GCMProfileService own GCMDriver, instead of deriving from it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync 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/extensions/extension_gcm_app_handler_unittest.cc
diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
index 8e2b980ed74911604674af27c3f3b80fc7cf28e8..fb65d2a0ad3f0ad872a82b7ac4d25f3d6f064595 100644
--- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
+++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/services/gcm/fake_gcm_client.h"
#include "chrome/browser/services/gcm/fake_gcm_client_factory.h"
#include "chrome/browser/services/gcm/fake_signin_manager.h"
+#include "chrome/browser/services/gcm/gcm_driver.h"
#include "chrome/browser/services/gcm/gcm_profile_service.h"
#include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
@@ -288,7 +289,7 @@ class ExtensionGCMAppHandlerTest : public testing::Test {
void Register(const std::string& app_id,
const std::vector<std::string>& sender_ids) {
- GetGCMProfileService()->Register(
+ GetGCMDriver()->Register(
app_id,
sender_ids,
base::Bind(&ExtensionGCMAppHandlerTest::RegisterCompleted,
@@ -301,12 +302,12 @@ class ExtensionGCMAppHandlerTest : public testing::Test {
waiter_.SignalCompleted();
}
- gcm::GCMProfileService* GetGCMProfileService() const {
- return gcm::GCMProfileServiceFactory::GetForProfile(profile());
+ gcm::GCMDriver* GetGCMDriver() const {
+ return gcm::GCMProfileServiceFactory::GetForProfile(profile())->driver();
}
bool HasAppHandlers(const std::string& app_id) const {
- return GetGCMProfileService()->app_handlers().count(app_id);
+ return GetGCMDriver()->app_handlers().count(app_id);
}
Profile* profile() const { return profile_.get(); }

Powered by Google App Engine
This is Rietveld 408576698