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

Side by Side Diff: chrome/browser/extensions/app_notification_storage.h

Issue 12680004: Remove chrome/ code to handle App Notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_STORAGE_H__
6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_STORAGE_H__
7
8 #include <set>
9
10 #include "chrome/browser/extensions/app_notification.h"
11
12 namespace base {
13 class FilePath;
14 }
15
16 namespace extensions {
17
18 // Represents storage for app notifications for a particular extension id.
19 //
20 // IMPORTANT NOTE: Instances of this class should only be used on the FILE
21 // thread.
22 class AppNotificationStorage {
23 public:
24 // Must be called on the FILE thread. The storage will be created at |path|.
25 static AppNotificationStorage* Create(const base::FilePath& path);
26
27 virtual ~AppNotificationStorage();
28
29 // Get the set of extension id's that have entries, putting them into
30 // |result|.
31 virtual bool GetExtensionIds(std::set<std::string>* result) = 0;
32
33 // Gets the list of stored notifications for extension_id. On success, writes
34 // results into |result|. On error, returns false.
35 virtual bool Get(const std::string& extension_id,
36 AppNotificationList* result) = 0;
37
38 // Writes the |list| for |extension_id| into storage.
39 virtual bool Set(const std::string& extension_id,
40 const AppNotificationList& list) = 0;
41
42 // Deletes all data for |extension_id|.
43 virtual bool Delete(const std::string& extension_id) = 0;
44 };
45
46 } // namespace extensions
47
48 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_STORAGE_H__
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_notification_manager_unittest.cc ('k') | chrome/browser/extensions/app_notification_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698