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

Side by Side Diff: apps/saved_devices_service.h

Issue 580363002: Update app info and install prompt UI to show retained devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | apps/saved_devices_service.cc » ('j') | apps/saved_devices_service.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 APPS_SAVED_DEVICES_SERVICE_H_ 5 #ifndef APPS_SAVED_DEVICES_SERVICE_H_
6 #define APPS_SAVED_DEVICES_SERVICE_H_ 6 #define APPS_SAVED_DEVICES_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 }; 88 };
89 89
90 explicit SavedDevicesService(Profile* profile); 90 explicit SavedDevicesService(Profile* profile);
91 virtual ~SavedDevicesService(); 91 virtual ~SavedDevicesService();
92 92
93 static SavedDevicesService* Get(Profile* profile); 93 static SavedDevicesService* Get(Profile* profile);
94 94
95 // Returns the SavedDevices for |extension_id|, creating it if necessary. 95 // Returns the SavedDevices for |extension_id|, creating it if necessary.
96 SavedDevices* GetOrInsert(const std::string& extension_id); 96 SavedDevices* GetOrInsert(const std::string& extension_id);
97 97
98 std::vector<SavedDeviceEntry> GetAllDevices( 98 std::vector<base::string16> GetPermissionMessageStrings(
99 const std::string& extension_id) const; 99 const std::string& extension_id) const;
100 100
101 // Clears the SavedDevices for |extension_id|. 101 // Clears the SavedDevices for |extension_id|.
102 void Clear(const std::string& extension_id); 102 void Clear(const std::string& extension_id);
103 103
104 private: 104 private:
105 // content::NotificationObserver. 105 // content::NotificationObserver.
106 virtual void Observe(int type, 106 virtual void Observe(int type,
107 const content::NotificationSource& source, 107 const content::NotificationSource& source,
108 const content::NotificationDetails& details) OVERRIDE; 108 const content::NotificationDetails& details) OVERRIDE;
109 109
110 // Returns the SavedDevices for |extension_id| or NULL if one does not exist. 110 // Returns the SavedDevices for |extension_id| or NULL if one does not exist.
111 SavedDevices* Get(const std::string& extension_id) const; 111 SavedDevices* Get(const std::string& extension_id) const;
112 112
113 std::map<std::string, SavedDevices*> extension_id_to_saved_devices_; 113 std::map<std::string, SavedDevices*> extension_id_to_saved_devices_;
114 Profile* profile_; 114 Profile* profile_;
115 content::NotificationRegistrar registrar_; 115 content::NotificationRegistrar registrar_;
116 base::ThreadChecker thread_checker_; 116 base::ThreadChecker thread_checker_;
117 117
118 DISALLOW_COPY_AND_ASSIGN(SavedDevicesService); 118 DISALLOW_COPY_AND_ASSIGN(SavedDevicesService);
119 }; 119 };
120 120
121 } // namespace apps 121 } // namespace apps
122 122
123 #endif // APPS_SAVED_DEVICES_SERVICE_H_ 123 #endif // APPS_SAVED_DEVICES_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | apps/saved_devices_service.cc » ('j') | apps/saved_devices_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698