Move the FakeGCMProfileService helper to the GCM Driver component

TBR=jianli, finnur and jamescook for include path changes

Bug: 829604
Change-Id: Icb53714ede7a4ce40ca38ee4c79740b64c70997a
Reviewed-on: https://chromium-review.googlesource.com/1001894
Reviewed-by: Peter Beverloo <[email protected]>
Reviewed-by: Finnur Thorarinsson <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Nicolas Zea (slow) <[email protected]>
Commit-Queue: Peter Beverloo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#549519}
diff --git a/components/gcm_driver/BUILD.gn b/components/gcm_driver/BUILD.gn
index fc55dc63..cc148ae 100644
--- a/components/gcm_driver/BUILD.gn
+++ b/components/gcm_driver/BUILD.gn
@@ -123,6 +123,8 @@
     "fake_gcm_app_handler.h",
     "fake_gcm_driver.cc",
     "fake_gcm_driver.h",
+    "fake_gcm_profile_service.cc",
+    "fake_gcm_profile_service.h",
   ]
 
   public_deps = [
@@ -130,11 +132,27 @@
   ]
   deps = [
     "//base",
+    "//components/gcm_driver/instance_id:test_support",
+    "//content/public/browser",
     "//google_apis/gcm:test_support",
     "//net",
     "//testing/gtest",
   ]
 
+  # This target goes with Instance ID and they can include headers from each
+  # other.
+  allow_circular_includes_from =
+      [ "//components/gcm_driver/instance_id:test_support" ]
+
+  if (is_ios) {
+    sources -= [
+      "fake_gcm_profile_service.cc",
+      "fake_gcm_profile_service.h",
+    ]
+
+    deps -= [ "//content/public/browser" ]
+  }
+
   if (!use_gcm_from_platform) {
     sources += [
       "fake_gcm_client.cc",