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

Side by Side Diff: content/browser/notifications/platform_notification_context_impl.h

Issue 2565323004: [NOT FOR COMMIT] Ownership clean-up for 2534443002 (Closed)
Patch Set: Created 4 years 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/browser/notifications/platform_notification_context_impl.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_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_ 5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_
6 #define CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_ 6 #define CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory>
9 #include <set> 10 #include <set>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/callback.h" 14 #include "base/callback.h"
14 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
15 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
18 #include "content/browser/notifications/notification_id_generator.h" 19 #include "content/browser/notifications/notification_id_generator.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const GURL& origin, 128 const GURL& origin,
128 const ReadResultCallback& callback); 129 const ReadResultCallback& callback);
129 130
130 // Updates the database (and the result callback) based on 131 // Updates the database (and the result callback) based on
131 // |displayed_notifications| 132 // |displayed_notifications|
132 // if |sync_supported|. Called on the IO thread. 133 // if |sync_supported|. Called on the IO thread.
133 void SynchronizeDisplayedNotificationsForServiceWorkerRegistration( 134 void SynchronizeDisplayedNotificationsForServiceWorkerRegistration(
134 const GURL& origin, 135 const GURL& origin,
135 int64_t service_worker_registration_id, 136 int64_t service_worker_registration_id,
136 const ReadAllResultCallback& callback, 137 const ReadAllResultCallback& callback,
137 std::set<std::string>* displayed_notifications, 138 std::unique_ptr<std::set<std::string>> displayed_notifications,
138 bool sync_supported); 139 bool sync_supported);
139 140
140 // Actually reads all notification data from the database. Must only be 141 // Actually reads all notification data from the database. Must only be
141 // called on the |task_runner_| thread. |callback| will be invoked on the 142 // called on the |task_runner_| thread. |callback| will be invoked on the
142 // IO thread when the operation has completed. 143 // IO thread when the operation has completed.
143 void DoReadAllNotificationDataForServiceWorkerRegistration( 144 void DoReadAllNotificationDataForServiceWorkerRegistration(
144 const GURL& origin, 145 const GURL& origin,
145 int64_t service_worker_registration_id, 146 int64_t service_worker_registration_id,
146 const ReadAllResultCallback& callback, 147 const ReadAllResultCallback& callback,
147 std::set<std::string>* displayed_notifications, 148 std::unique_ptr<std::set<std::string>> displayed_notifications,
148 bool synchronization_supported); 149 bool synchronization_supported);
149 150
150 // Actually writes the notification database to the database. Must only be 151 // Actually writes the notification database to the database. Must only be
151 // called on the |task_runner_| thread. |callback| will be invoked on the 152 // called on the |task_runner_| thread. |callback| will be invoked on the
152 // IO thread when the operation has completed. 153 // IO thread when the operation has completed.
153 void DoWriteNotificationData(const GURL& origin, 154 void DoWriteNotificationData(const GURL& origin,
154 const NotificationDatabaseData& database_data, 155 const NotificationDatabaseData& database_data,
155 const WriteResultCallback& callback); 156 const WriteResultCallback& callback);
156 157
157 // Actually deletes the notification information from the database. Must only 158 // Actually deletes the notification information from the database. Must only
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // The notification services are owned by the platform context, and will be 196 // The notification services are owned by the platform context, and will be
196 // removed when either this class is destroyed or the Mojo pipe disconnects. 197 // removed when either this class is destroyed or the Mojo pipe disconnects.
197 std::vector<std::unique_ptr<BlinkNotificationServiceImpl>> services_; 198 std::vector<std::unique_ptr<BlinkNotificationServiceImpl>> services_;
198 199
199 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationContextImpl); 200 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationContextImpl);
200 }; 201 };
201 202
202 } // namespace content 203 } // namespace content
203 204
204 #endif // CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_ 205 #endif // CONTENT_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_CONTEXT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/notifications/platform_notification_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698