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

Side by Side Diff: chrome/browser/media_gallery/media_galleries_preferences.h

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 years, 10 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_
6 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "base/string16.h" 15 #include "base/string16.h"
16 #include "chrome/browser/profiles/profile_keyed_service.h" 16 #include "chrome/browser/profiles/profile_keyed_service.h"
17 17
18 class PrefServiceSyncable; 18 class PrefRegistrySyncable;
19 class Profile; 19 class Profile;
20 20
21 namespace base { 21 namespace base {
22 class DictionaryValue; 22 class DictionaryValue;
23 } 23 }
24 24
25 namespace extensions { 25 namespace extensions {
26 class Extension; 26 class Extension;
27 class ExtensionPrefs; 27 class ExtensionPrefs;
28 } 28 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 MediaGalleryPrefId pref_id, 132 MediaGalleryPrefId pref_id,
133 bool has_permission); 133 bool has_permission);
134 134
135 const MediaGalleriesPrefInfoMap& known_galleries() const { 135 const MediaGalleriesPrefInfoMap& known_galleries() const {
136 return known_galleries_; 136 return known_galleries_;
137 } 137 }
138 138
139 // ProfileKeyedService implementation: 139 // ProfileKeyedService implementation:
140 virtual void Shutdown() OVERRIDE; 140 virtual void Shutdown() OVERRIDE;
141 141
142 static void RegisterUserPrefs(PrefServiceSyncable* prefs); 142 static void RegisterUserPrefs(PrefRegistrySyncable* registry);
143 143
144 // Returns true if the media gallery preferences system has ever been used 144 // Returns true if the media gallery preferences system has ever been used
145 // for this profile. To be exact, it checks if a gallery has ever been added 145 // for this profile. To be exact, it checks if a gallery has ever been added
146 // (including defaults). 146 // (including defaults).
147 static bool APIHasBeenUsed(Profile* profile); 147 static bool APIHasBeenUsed(Profile* profile);
148 148
149 private: 149 private:
150 typedef std::map<std::string /*device id*/, MediaGalleryPrefIdSet> 150 typedef std::map<std::string /*device id*/, MediaGalleryPrefIdSet>
151 DeviceIdPrefIdsMap; 151 DeviceIdPrefIdsMap;
152 152
(...skipping 20 matching lines...) Expand all
173 DeviceIdPrefIdsMap device_map_; 173 DeviceIdPrefIdsMap device_map_;
174 174
175 ObserverList<GalleryChangeObserver> gallery_change_observers_; 175 ObserverList<GalleryChangeObserver> gallery_change_observers_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences); 177 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences);
178 }; 178 };
179 179
180 } // namespace chrome 180 } // namespace chrome
181 181
182 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ 182 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.cc ('k') | chrome/browser/media_gallery/media_galleries_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698