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

Unified Diff: chrome/browser/extensions/api/instance_id/instance_id_apitest.cc

Issue 2122603007: Move FakeGCMProfileService to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mo' fix Created 4 years, 5 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/api/instance_id/instance_id_apitest.cc
diff --git a/chrome/browser/extensions/api/instance_id/instance_id_apitest.cc b/chrome/browser/extensions/api/instance_id/instance_id_apitest.cc
index 63a4674329d9a3318a185764ad97694bff63dae5..63382dbbd81ca5935fb89bc62b69d448679a1ea5 100644
--- a/chrome/browser/extensions/api/instance_id/instance_id_apitest.cc
+++ b/chrome/browser/extensions/api/instance_id/instance_id_apitest.cc
@@ -11,10 +11,10 @@
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_gcm_app_handler.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/services/gcm/fake_gcm_profile_service.h"
#include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
#include "chrome/browser/services/gcm/instance_id/instance_id_profile_service_factory.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "components/gcm_driver/fake_gcm_profile_service.h"
#include "components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h"
#include "components/version_info/version_info.h"
#include "extensions/test/result_catcher.h"
@@ -23,18 +23,6 @@ using extensions::ResultCatcher;
namespace extensions {
-namespace {
-
-std::unique_ptr<KeyedService> BuildFakeGCMProfileService(
- content::BrowserContext* context) {
- std::unique_ptr<gcm::FakeGCMProfileService> service(
- new gcm::FakeGCMProfileService(Profile::FromBrowserContext(context)));
- service->SetDriverForTesting(new instance_id::FakeGCMDriverForInstanceID());
kbalazs 2016/07/14 23:14:46 FYI, this is why the tests failed. This Build* var
- return std::move(service);
-}
-
-} // namespace
-
class InstanceIDApiTest : public ExtensionApiTest {
public:
InstanceIDApiTest();
@@ -51,7 +39,7 @@ InstanceIDApiTest::InstanceIDApiTest() {
void InstanceIDApiTest::SetUpOnMainThread() {
gcm::GCMProfileServiceFactory::GetInstance()->SetTestingFactory(
- browser()->profile(), &BuildFakeGCMProfileService);
+ browser()->profile(), &gcm::FakeGCMProfileService::Build);
ExtensionApiTest::SetUpOnMainThread();
}
« no previous file with comments | « chrome/browser/extensions/api/gcm/gcm_apitest.cc ('k') | chrome/browser/extensions/service_worker_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698