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

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

Issue 1282013004: BackgroundSyncManager tracks client registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from PS12 Created 5 years, 4 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 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
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() {}
michaeln 2015/08/19 01:56:01 deletion has no semantic meaning
jkarlin 2015/08/19 12:47:06 Made 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698