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

Unified Diff: components/gcm_driver/fake_gcm_profile_service.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
« no previous file with comments | « components/gcm_driver/fake_gcm_profile_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/fake_gcm_profile_service.cc
diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.cc b/components/gcm_driver/fake_gcm_profile_service.cc
similarity index 94%
rename from chrome/browser/services/gcm/fake_gcm_profile_service.cc
rename to components/gcm_driver/fake_gcm_profile_service.cc
index 97b79c1c32668bb5dd04921a70ff83b5ba75f547..4c68dc27c5f48c2aaa21b4870173cce87bc76bbe 100644
--- a/chrome/browser/services/gcm/fake_gcm_profile_service.cc
+++ b/components/gcm_driver/fake_gcm_profile_service.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/services/gcm/fake_gcm_profile_service.h"
+#include "components/gcm_driver/fake_gcm_profile_service.h"
#include <utility>
@@ -14,11 +14,9 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "chrome/browser/profiles/profile.h"
#include "components/gcm_driver/fake_gcm_client_factory.h"
#include "components/gcm_driver/fake_gcm_driver.h"
#include "components/gcm_driver/gcm_driver.h"
-#include "content/public/browser/browser_context.h"
namespace gcm {
@@ -121,14 +119,12 @@ void CustomFakeGCMDriver::OnDispatchMessage(const std::string& app_id,
// static
std::unique_ptr<KeyedService> FakeGCMProfileService::Build(
content::BrowserContext* context) {
- Profile* profile = static_cast<Profile*>(context);
- std::unique_ptr<FakeGCMProfileService> service(
- new FakeGCMProfileService(profile));
+ std::unique_ptr<FakeGCMProfileService> service(new FakeGCMProfileService);
service->SetDriverForTesting(new CustomFakeGCMDriver(service.get()));
return std::move(service);
}
-FakeGCMProfileService::FakeGCMProfileService(Profile* profile)
+FakeGCMProfileService::FakeGCMProfileService()
: collect_(false),
registration_count_(0) {
}
« no previous file with comments | « components/gcm_driver/fake_gcm_profile_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698