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

Unified Diff: content/browser/background_sync/background_sync_service_impl.h

Issue 1283703003: Change ownership of BackgroundSyncServiceImpl to BackgroundSyncContextImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fixes 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/background_sync/background_sync_service_impl.h
diff --git a/content/browser/background_sync/background_sync_service_impl.h b/content/browser/background_sync/background_sync_service_impl.h
index 6d23ea0d59c750b7f6030f95a1009af82688b65f..c9695e1221851d4bcca9a6f251f01d06100d5f99 100644
--- a/content/browser/background_sync/background_sync_service_impl.h
+++ b/content/browser/background_sync/background_sync_service_impl.h
@@ -10,7 +10,7 @@
#include "base/memory/ref_counted.h"
#include "content/browser/background_sync/background_sync_manager.h"
#include "content/common/background_sync_service.mojom.h"
-#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
namespace content {
@@ -19,7 +19,7 @@ class BackgroundSyncContextImpl;
class CONTENT_EXPORT BackgroundSyncServiceImpl
: public NON_EXPORTED_BASE(BackgroundSyncService) {
public:
- static void Create(
+ BackgroundSyncServiceImpl(
const scoped_refptr<BackgroundSyncContextImpl>& background_sync_context,
mojo::InterfaceRequest<BackgroundSyncService> request);
@@ -28,13 +28,6 @@ class CONTENT_EXPORT BackgroundSyncServiceImpl
private:
friend class BackgroundSyncServiceImplTest;
- static void CreateOnIOThread(
- const scoped_refptr<BackgroundSyncContextImpl>& background_sync_context,
- mojo::InterfaceRequest<BackgroundSyncService> request);
-
- explicit BackgroundSyncServiceImpl(
- const scoped_refptr<BackgroundSyncContextImpl>& background_sync_context,
- mojo::InterfaceRequest<BackgroundSyncService> request);
// BackgroundSyncService methods:
void Register(content::SyncRegistrationPtr options,
@@ -67,8 +60,11 @@ class CONTENT_EXPORT BackgroundSyncServiceImpl
BackgroundSyncStatus status,
const std::vector<BackgroundSyncRegistration>& result);
+ // Called when an error is detected on binding_.
+ void OnConnectionError();
+
scoped_refptr<BackgroundSyncContextImpl> background_sync_context_;
- mojo::StrongBinding<BackgroundSyncService> binding_;
+ mojo::Binding<BackgroundSyncService> binding_;
base::WeakPtrFactory<BackgroundSyncServiceImpl> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698