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

Side by Side Diff: content/browser/background_sync/background_sync_registration.cc

Issue 1960843002: [OnionSoup] Move background_sync.mojom from //content to //third_party/WebKit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address dcheng@'s comment Created 4 years, 7 months 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698