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

Side by Side Diff: content/child/background_sync/background_sync_provider.h

Issue 1131943005: [Background Sync] Add proper error status to API calls and callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split RegisterCallback into two methods Created 5 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
« no previous file with comments | « no previous file | content/child/background_sync/background_sync_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_ 5 #ifndef CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_
6 #define CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_ 6 #define CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 blink::WebSyncRegistrationCallbacks* callbacks); 45 blink::WebSyncRegistrationCallbacks* callbacks);
46 void getRegistrations( 46 void getRegistrations(
47 blink::WebSyncRegistration::Periodicity periodicity, 47 blink::WebSyncRegistration::Periodicity periodicity,
48 blink::WebServiceWorkerRegistration* service_worker_registration, 48 blink::WebServiceWorkerRegistration* service_worker_registration,
49 blink::WebSyncGetRegistrationsCallbacks* callbacks); 49 blink::WebSyncGetRegistrationsCallbacks* callbacks);
50 50
51 private: 51 private:
52 // Callback handlers 52 // Callback handlers
53 void RegisterCallback( 53 void RegisterCallback(
54 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks, 54 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
55 BackgroundSyncError error,
55 const SyncRegistrationPtr& options); 56 const SyncRegistrationPtr& options);
56 void UnregisterCallback( 57 void UnregisterCallback(
57 scoped_ptr<blink::WebSyncUnregistrationCallbacks> callbacks, 58 scoped_ptr<blink::WebSyncUnregistrationCallbacks> callbacks,
58 bool success); 59 BackgroundSyncError error);
60 void GetRegistrationCallback(
61 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
62 BackgroundSyncError error,
63 const SyncRegistrationPtr& options);
59 void GetRegistrationsCallback( 64 void GetRegistrationsCallback(
60 scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks, 65 scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks,
66 BackgroundSyncError error,
61 const mojo::Array<SyncRegistrationPtr>& registrations); 67 const mojo::Array<SyncRegistrationPtr>& registrations);
62 68
63 // Helper method that returns an initialized BackgroundSyncServicePtr. 69 // Helper method that returns an initialized BackgroundSyncServicePtr.
64 BackgroundSyncServicePtr& GetBackgroundSyncServicePtr(); 70 BackgroundSyncServicePtr& GetBackgroundSyncServicePtr();
65 71
66 ServiceRegistry* service_registry_; 72 ServiceRegistry* service_registry_;
67 BackgroundSyncServicePtr background_sync_service_; 73 BackgroundSyncServicePtr background_sync_service_;
68 74
69 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncProvider); 75 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncProvider);
70 }; 76 };
71 77
72 } // namespace content 78 } // namespace content
73 79
74 #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_ 80 #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/background_sync/background_sync_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698