| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/background_sync/background_sync_registration.h" | 5 #include "content/browser/background_sync/background_sync_registration.h" |
| 6 | 6 |
| 7 namespace mojo { | 7 namespace mojo { |
| 8 | 8 |
| 9 #define COMPILE_ASSERT_MATCHING_ENUM(mojo_name, browser_name) \ | 9 #define COMPILE_ASSERT_MATCHING_ENUM(mojo_name, browser_name) \ |
| 10 COMPILE_ASSERT(static_cast<int>(content::mojo_name) == \ | 10 COMPILE_ASSERT(static_cast<int>(content::mojo_name) == \ |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 static_cast<content::BackgroundSyncNetworkState>(options->network_state); | 73 static_cast<content::BackgroundSyncNetworkState>(options->network_state); |
| 74 return out.Pass(); | 74 return out.Pass(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace | 77 } // namespace |
| 78 | 78 |
| 79 namespace content { | 79 namespace content { |
| 80 | 80 |
| 81 // TODO(thakis): Remove this once http://crbug.com/488634 is fixed. | 81 // TODO(thakis): Remove this once http://crbug.com/488634 is fixed. |
| 82 BackgroundSyncRegistration::BackgroundSyncRegistration() = default; | 82 BackgroundSyncRegistration::BackgroundSyncRegistration() = default; |
| 83 BackgroundSyncRegistration::~BackgroundSyncRegistration() = default; |
| 83 | 84 |
| 84 const BackgroundSyncRegistration::RegistrationId | 85 const BackgroundSyncRegistration::RegistrationId |
| 85 BackgroundSyncRegistration::kInvalidRegistrationId = -1; | 86 BackgroundSyncRegistration::kInvalidRegistrationId = -1; |
| 86 | 87 |
| 87 const BackgroundSyncRegistration::RegistrationId | 88 const BackgroundSyncRegistration::RegistrationId |
| 88 BackgroundSyncRegistration::kInitialId = 0; | 89 BackgroundSyncRegistration::kInitialId = 0; |
| 89 | 90 |
| 90 bool BackgroundSyncRegistration::Equals( | 91 bool BackgroundSyncRegistration::Equals( |
| 91 const BackgroundSyncRegistration& other) const { | 92 const BackgroundSyncRegistration& other) const { |
| 92 return options_.Equals(other.options_); | 93 return options_.Equals(other.options_); |
| 93 } | 94 } |
| 94 | 95 |
| 95 bool BackgroundSyncRegistration::IsValid() const { | 96 bool BackgroundSyncRegistration::IsValid() const { |
| 96 return id_ != kInvalidRegistrationId; | 97 return id_ != kInvalidRegistrationId; |
| 97 } | 98 } |
| 98 | 99 |
| 99 } // namespace content | 100 } // namespace content |
| OLD | NEW |