| OLD | NEW |
| 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_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 MediaGalleryPrefId pref_id, | 192 MediaGalleryPrefId pref_id, |
| 193 bool has_permission); | 193 bool has_permission); |
| 194 | 194 |
| 195 const MediaGalleriesPrefInfoMap& known_galleries() const { | 195 const MediaGalleriesPrefInfoMap& known_galleries() const { |
| 196 return known_galleries_; | 196 return known_galleries_; |
| 197 } | 197 } |
| 198 | 198 |
| 199 // BrowserContextKeyedService implementation: | 199 // BrowserContextKeyedService implementation: |
| 200 virtual void Shutdown() OVERRIDE; | 200 virtual void Shutdown() OVERRIDE; |
| 201 | 201 |
| 202 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 202 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 203 | 203 |
| 204 // Returns true if the media gallery preferences system has ever been used | 204 // Returns true if the media gallery preferences system has ever been used |
| 205 // for this profile. To be exact, it checks if a gallery has ever been added | 205 // for this profile. To be exact, it checks if a gallery has ever been added |
| 206 // (including defaults). | 206 // (including defaults). |
| 207 static bool APIHasBeenUsed(Profile* profile); | 207 static bool APIHasBeenUsed(Profile* profile); |
| 208 | 208 |
| 209 private: | 209 private: |
| 210 friend class MediaGalleriesPreferencesTest; | 210 friend class MediaGalleriesPreferencesTest; |
| 211 friend class MediaGalleriesPermissionsTest; | 211 friend class MediaGalleriesPermissionsTest; |
| 212 | 212 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 DeviceIdPrefIdsMap device_map_; | 300 DeviceIdPrefIdsMap device_map_; |
| 301 | 301 |
| 302 ObserverList<GalleryChangeObserver> gallery_change_observers_; | 302 ObserverList<GalleryChangeObserver> gallery_change_observers_; |
| 303 | 303 |
| 304 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences); | 304 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences); |
| 305 }; | 305 }; |
| 306 | 306 |
| 307 } // namespace chrome | 307 } // namespace chrome |
| 308 | 308 |
| 309 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ | 309 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ |
| OLD | NEW |