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

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

Issue 1282013004: BackgroundSyncManager tracks client registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed test Created 5 years, 3 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_CONTEXT_IMPL_H_ 5 #ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTEXT_IMPL_H_
6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTEXT_IMPL_H_ 6 #define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTEXT_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // be deleted. Call on the IO thread. 42 // be deleted. Call on the IO thread.
43 void ServiceHadConnectionError(BackgroundSyncServiceImpl* service); 43 void ServiceHadConnectionError(BackgroundSyncServiceImpl* service);
44 44
45 // Call on the IO thread. 45 // Call on the IO thread.
46 BackgroundSyncManager* background_sync_manager() const override; 46 BackgroundSyncManager* background_sync_manager() const override;
47 47
48 protected: 48 protected:
49 ~BackgroundSyncContextImpl() override; 49 ~BackgroundSyncContextImpl() override;
50 50
51 private: 51 private:
52 friend class BackgroundSyncServiceImplTest;
53
52 void CreateBackgroundSyncManager( 54 void CreateBackgroundSyncManager(
53 const scoped_refptr<ServiceWorkerContextWrapper>& context); 55 const scoped_refptr<ServiceWorkerContextWrapper>& context);
54 56
55 void CreateServiceOnIOThread( 57 void CreateServiceOnIOThread(
56 mojo::InterfaceRequest<BackgroundSyncService> request); 58 mojo::InterfaceRequest<BackgroundSyncService> request);
57 59
58 void ShutdownOnIO(); 60 void ShutdownOnIO();
59 61
60 // Only accessed on the IO thread. 62 // Only accessed on the IO thread.
61 scoped_ptr<BackgroundSyncManager> background_sync_manager_; 63 scoped_ptr<BackgroundSyncManager> background_sync_manager_;
62 64
63 // The services are owned by this. They're either deleted 65 // The services are owned by this. They're either deleted
64 // during ShutdownOnIO or when the channel is closed via 66 // during ShutdownOnIO or when the channel is closed via
65 // ServiceHadConnectionError. Only accessed on the IO thread. 67 // ServiceHadConnectionError. Only accessed on the IO thread.
66 std::set<BackgroundSyncServiceImpl*> services_; 68 std::set<BackgroundSyncServiceImpl*> services_;
67 69
68 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncContextImpl); 70 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncContextImpl);
69 }; 71 };
70 72
71 } // namespace content 73 } // namespace content
72 74
73 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTEXT_IMPL_H_ 75 #endif // CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTEXT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698