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

Side by Side Diff: content/browser/background_sync/background_sync_service_impl.h

Issue 1763123002: [BackgroundSync] Remove BackgroundSyncRegistrationHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from PS7 Created 4 years, 9 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 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 20 matching lines...) Expand all
31 private: 31 private:
32 friend class BackgroundSyncServiceImplTest; 32 friend class BackgroundSyncServiceImplTest;
33 33
34 // BackgroundSyncService methods: 34 // BackgroundSyncService methods:
35 void Register(content::SyncRegistrationPtr options, 35 void Register(content::SyncRegistrationPtr options,
36 int64_t sw_registration_id, 36 int64_t sw_registration_id,
37 bool requested_from_service_worker, 37 bool requested_from_service_worker,
38 const RegisterCallback& callback) override; 38 const RegisterCallback& callback) override;
39 void GetRegistrations(int64_t sw_registration_id, 39 void GetRegistrations(int64_t sw_registration_id,
40 const GetRegistrationsCallback& callback) override; 40 const GetRegistrationsCallback& callback) override;
41 void DuplicateRegistrationHandle(
42 BackgroundSyncRegistrationHandle::HandleId handle_id,
43 const DuplicateRegistrationHandleCallback& callback) override;
44 void ReleaseRegistration(
45 BackgroundSyncRegistrationHandle::HandleId handle_id) override;
46 41
47 void OnRegisterResult(const RegisterCallback& callback, 42 void OnRegisterResult(const RegisterCallback& callback,
48 BackgroundSyncStatus status, 43 BackgroundSyncStatus status,
49 scoped_ptr<BackgroundSyncRegistrationHandle> result); 44 scoped_ptr<BackgroundSyncRegistration> result);
50 void OnGetRegistrationsResult( 45 void OnGetRegistrationsResult(
51 const GetRegistrationsCallback& callback, 46 const GetRegistrationsCallback& callback,
52 BackgroundSyncStatus status, 47 BackgroundSyncStatus status,
53 scoped_ptr<ScopedVector<BackgroundSyncRegistrationHandle>> result); 48 scoped_ptr<ScopedVector<BackgroundSyncRegistration>> result);
54 49
55 // Called when an error is detected on binding_. 50 // Called when an error is detected on binding_.
56 void OnConnectionError(); 51 void OnConnectionError();
57 52
58 // background_sync_context_ owns this. 53 // background_sync_context_ owns this.
59 BackgroundSyncContextImpl* background_sync_context_; 54 BackgroundSyncContextImpl* background_sync_context_;
60 55
61 mojo::Binding<BackgroundSyncService> binding_; 56 mojo::Binding<BackgroundSyncService> binding_;
62 57
63 // The registrations that the client might reference.
64 IDMap<BackgroundSyncRegistrationHandle,
65 IDMapOwnPointer,
66 BackgroundSyncRegistrationHandle::HandleId> active_handles_;
67
68 base::WeakPtrFactory<BackgroundSyncServiceImpl> weak_ptr_factory_; 58 base::WeakPtrFactory<BackgroundSyncServiceImpl> weak_ptr_factory_;
69 59
70 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncServiceImpl); 60 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncServiceImpl);
71 }; 61 };
72 62
73 } // namespace content 63 } // namespace content
74 64
75 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_ 65 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698