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 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 const BackgroundSyncRegistration& other) const { | 22 const BackgroundSyncRegistration& other) const { |
23 return options_.Equals(other.options_); | 23 return options_.Equals(other.options_); |
24 } | 24 } |
25 | 25 |
26 bool BackgroundSyncRegistration::IsValid() const { | 26 bool BackgroundSyncRegistration::IsValid() const { |
27 return id_ != kInvalidRegistrationId; | 27 return id_ != kInvalidRegistrationId; |
28 } | 28 } |
29 | 29 |
30 bool BackgroundSyncRegistration::IsFiring() const { | 30 bool BackgroundSyncRegistration::IsFiring() const { |
31 switch (sync_state_) { | 31 switch (sync_state_) { |
32 case mojom::BackgroundSyncState::FIRING: | 32 case blink::mojom::BackgroundSyncState::FIRING: |
33 case mojom::BackgroundSyncState::REREGISTERED_WHILE_FIRING: | 33 case blink::mojom::BackgroundSyncState::REREGISTERED_WHILE_FIRING: |
34 return true; | 34 return true; |
35 case mojom::BackgroundSyncState::PENDING: | 35 case blink::mojom::BackgroundSyncState::PENDING: |
36 return false; | 36 return false; |
37 } | 37 } |
38 NOTREACHED(); | 38 NOTREACHED(); |
39 return false; | 39 return false; |
40 } | 40 } |
41 | 41 |
42 } // namespace content | 42 } // namespace content |
OLD | NEW |