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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_unittest.cc

Issue 2122603007: Move FakeGCMProfileService to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/push_messaging/push_messaging_service_unittest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_service_unittest.cc b/chrome/browser/push_messaging/push_messaging_service_unittest.cc
index 945c21fc67d6ecba4e4ec84545288d8df86d3fd0..b388710f55b372036fa60cb439024c0219019a8c 100644
--- a/chrome/browser/push_messaging/push_messaging_service_unittest.cc
+++ b/chrome/browser/push_messaging/push_messaging_service_unittest.cc
@@ -19,12 +19,12 @@
#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"
#include "chrome/browser/push_messaging/push_messaging_service_factory.h"
#include "chrome/browser/push_messaging/push_messaging_service_impl.h"
-#include "chrome/browser/services/gcm/fake_gcm_profile_service.h"
#include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
#include "chrome/test/base/testing_profile.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/gcm_driver/crypto/gcm_crypto_test_helpers.h"
#include "components/gcm_driver/fake_gcm_client_factory.h"
+#include "components/gcm_driver/fake_gcm_profile_service.h"
#include "components/gcm_driver/gcm_profile_service.h"
#include "content/public/common/push_event_payload.h"
#include "content/public/common/push_subscription_options.h"
@@ -74,11 +74,6 @@ class PushMessagingTestingProfile : public TestingProfile {
DISALLOW_COPY_AND_ASSIGN(PushMessagingTestingProfile);
};
-std::unique_ptr<KeyedService> BuildFakeGCMProfileService(
- content::BrowserContext* context) {
- return gcm::FakeGCMProfileService::Build(static_cast<Profile*>(context));
-}
-
} // namespace
class PushMessagingServiceTest : public ::testing::Test {
@@ -92,7 +87,7 @@ class PushMessagingServiceTest : public ::testing::Test {
// Override the GCM Profile service so that we can send fake messages.
gcm::GCMProfileServiceFactory::GetInstance()->SetTestingFactory(
- &profile_, &BuildFakeGCMProfileService);
+ &profile_, &gcm::FakeGCMProfileService::Build);
}
~PushMessagingServiceTest() override {}

Powered by Google App Engine
This is Rietveld 408576698