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

Unified Diff: content/child/background_sync/background_sync_type_converters.cc

Issue 2473483012: Move content/child/background_sync to Blink. (Closed)
Patch Set: Fix nits Created 4 years, 1 month 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: content/child/background_sync/background_sync_type_converters.cc
diff --git a/content/child/background_sync/background_sync_type_converters.cc b/content/child/background_sync/background_sync_type_converters.cc
index 634df01a6a12595850fce575b1802040857be896..d303e679cf3f2f26fee6aff1c70ca89d8608f111 100644
--- a/content/child/background_sync/background_sync_type_converters.cc
+++ b/content/child/background_sync/background_sync_type_converters.cc
@@ -13,16 +13,6 @@ namespace mojo {
static_cast<int>(blink::blink_name), \
"mojo and blink enums must match")
-COMPILE_ASSERT_MATCHING_ENUM(mojom::BackgroundSyncNetworkState::ANY,
- WebSyncRegistration::NetworkStateAny);
-COMPILE_ASSERT_MATCHING_ENUM(mojom::BackgroundSyncNetworkState::AVOID_CELLULAR,
- WebSyncRegistration::NetworkStateAvoidCellular);
-COMPILE_ASSERT_MATCHING_ENUM(mojom::BackgroundSyncNetworkState::ONLINE,
- WebSyncRegistration::NetworkStateOnline);
-COMPILE_ASSERT_MATCHING_ENUM(mojom::BackgroundSyncNetworkState::MAX,
- WebSyncRegistration::NetworkStateOnline);
-COMPILE_ASSERT_MATCHING_ENUM(mojom::BackgroundSyncNetworkState::MAX,
- WebSyncRegistration::NetworkStateLast);
COMPILE_ASSERT_MATCHING_ENUM(
mojom::BackgroundSyncEventLastChance::IS_NOT_LAST_CHANCE,
WebServiceWorkerContextProxy::IsNotLastChance);
@@ -31,49 +21,6 @@ COMPILE_ASSERT_MATCHING_ENUM(
WebServiceWorkerContextProxy::IsLastChance);
// static
-blink::WebSyncRegistration::NetworkState
-TypeConverter<blink::WebSyncRegistration::NetworkState,
- blink::mojom::BackgroundSyncNetworkState>::
- Convert(blink::mojom::BackgroundSyncNetworkState input) {
- return static_cast<blink::WebSyncRegistration::NetworkState>(input);
-}
-
-// static
-blink::mojom::BackgroundSyncNetworkState
-TypeConverter<blink::mojom::BackgroundSyncNetworkState,
- blink::WebSyncRegistration::NetworkState>::
- Convert(blink::WebSyncRegistration::NetworkState input) {
- return static_cast<blink::mojom::BackgroundSyncNetworkState>(input);
-}
-
-// static
-std::unique_ptr<blink::WebSyncRegistration>
-TypeConverter<std::unique_ptr<blink::WebSyncRegistration>,
- blink::mojom::SyncRegistrationPtr>::
- Convert(const blink::mojom::SyncRegistrationPtr& input) {
- std::unique_ptr<blink::WebSyncRegistration> result(
- new blink::WebSyncRegistration());
- result->id = input->id;
- result->tag = blink::WebString::fromUTF8(input->tag);
- result->networkState =
- ConvertTo<blink::WebSyncRegistration::NetworkState>(input->network_state);
- return result;
-}
-
-// static
-blink::mojom::SyncRegistrationPtr
-TypeConverter<blink::mojom::SyncRegistrationPtr, blink::WebSyncRegistration>::
- Convert(const blink::WebSyncRegistration& input) {
- blink::mojom::SyncRegistrationPtr result(
- blink::mojom::SyncRegistration::New());
- result->id = input.id;
- result->tag = input.tag.utf8();
- result->network_state =
- ConvertTo<blink::mojom::BackgroundSyncNetworkState>(input.networkState);
- return result;
-}
-
-// static
blink::WebServiceWorkerContextProxy::LastChanceOption
TypeConverter<blink::WebServiceWorkerContextProxy::LastChanceOption,
blink::mojom::BackgroundSyncEventLastChance>::

Powered by Google App Engine
This is Rietveld 408576698