Commit 896e3db5 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Remove dependencies from components/invalidation on jingle

After recent cleanups (see crbug.com/1029481), the jingle code isn't
used anymore.

Bug: 912042
Change-Id: Ia68783f77849d3efd37d43e87a390e464c56714f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2052143
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741080}
parent 5949a80b
...@@ -40,6 +40,7 @@ static_library("impl") { ...@@ -40,6 +40,7 @@ static_library("impl") {
"invalidator_registrar_with_memory.h", "invalidator_registrar_with_memory.h",
"mock_ack_handler.cc", "mock_ack_handler.cc",
"mock_ack_handler.h", "mock_ack_handler.h",
"network_channel.h",
"per_user_topic_subscription_manager.cc", "per_user_topic_subscription_manager.cc",
"per_user_topic_subscription_manager.h", "per_user_topic_subscription_manager.h",
"per_user_topic_subscription_request.cc", "per_user_topic_subscription_request.cc",
...@@ -73,20 +74,11 @@ static_library("impl") { ...@@ -73,20 +74,11 @@ static_library("impl") {
# metrics" bit should be part of a Topic. # metrics" bit should be part of a Topic.
"//components/sync/base", "//components/sync/base",
"//google_apis", "//google_apis",
"//jingle:notifier",
"//net:net", "//net:net",
"//services/data_decoder/public/cpp", "//services/data_decoder/public/cpp",
"//services/network/public/cpp", "//services/network/public/cpp",
"//services/network/public/mojom", "//services/network/public/mojom",
] ]
if (!is_android) {
sources += [
"network_channel.h",
"notifier_reason_util.cc",
"notifier_reason_util.h",
]
}
} }
source_set("unit_tests") { source_set("unit_tests") {
...@@ -152,14 +144,12 @@ static_library("test_support") { ...@@ -152,14 +144,12 @@ static_library("test_support") {
public_deps = [ public_deps = [
":impl", ":impl",
"//jingle:notifier_test_util",
"//third_party/cacheinvalidation", "//third_party/cacheinvalidation",
] ]
deps = [ deps = [
"//base", "//base",
"//components/gcm_driver:test_support", "//components/gcm_driver:test_support",
"//components/keyed_service/core", "//components/keyed_service/core",
"//jingle:notifier",
"//net", "//net",
"//testing/gmock", "//testing/gmock",
"//testing/gtest", "//testing/gtest",
......
...@@ -13,8 +13,6 @@ include_rules = [ ...@@ -13,8 +13,6 @@ include_rules = [
"+google_apis/gaia", "+google_apis/gaia",
"+google_apis/gcm", "+google_apis/gcm",
"+jingle/glue/network_service_config_test_util.h",
"+jingle/notifier",
"+net/base/backoff_entry.h", "+net/base/backoff_entry.h",
"+net/base/ip_endpoint.h", "+net/base/ip_endpoint.h",
"+net/base/network_change_notifier.h", "+net/base/network_change_notifier.h",
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/invalidation/impl/notifier_reason_util.h"
#include "base/logging.h"
namespace syncer {
InvalidatorState FromNotifierReason(
notifier::NotificationsDisabledReason reason) {
switch (reason) {
case notifier::NO_NOTIFICATION_ERROR:
return INVALIDATIONS_ENABLED;
case notifier::TRANSIENT_NOTIFICATION_ERROR:
return TRANSIENT_INVALIDATION_ERROR;
case notifier::NOTIFICATION_CREDENTIALS_REJECTED:
return INVALIDATION_CREDENTIALS_REJECTED;
default:
NOTREACHED();
return DEFAULT_INVALIDATION_ERROR;
}
}
notifier::NotificationsDisabledReason ToNotifierReasonForTest(
InvalidatorState state) {
switch (state) {
case TRANSIENT_INVALIDATION_ERROR:
return notifier::TRANSIENT_NOTIFICATION_ERROR;
case INVALIDATION_CREDENTIALS_REJECTED:
return notifier::NOTIFICATION_CREDENTIALS_REJECTED;
case INVALIDATIONS_ENABLED:
// Fall through.
default:
NOTREACHED();
return notifier::TRANSIENT_NOTIFICATION_ERROR;
}
}
} // namespace syncer
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_INVALIDATION_IMPL_NOTIFIER_REASON_UTIL_H_
#define COMPONENTS_INVALIDATION_IMPL_NOTIFIER_REASON_UTIL_H_
#include "components/invalidation/public/invalidator_state.h"
#include "jingle/notifier/listener/push_client_observer.h"
namespace syncer {
InvalidatorState FromNotifierReason(
notifier::NotificationsDisabledReason reason);
// Should not be called when |state| == INVALIDATIONS_ENABLED.
notifier::NotificationsDisabledReason
ToNotifierReasonForTest(InvalidatorState state);
} // namespace syncer
#endif // COMPONENTS_INVALIDATION_IMPL_NOTIFIER_REASON_UTIL_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment