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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 225 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
226 | 226 |
227 // Returns true if the media gallery preferences system has ever been used | 227 // Returns true if the media gallery preferences system has ever been used |
228 // for this profile. To be exact, it checks if a gallery has ever been added | 228 // for this profile. To be exact, it checks if a gallery has ever been added |
229 // (including defaults). | 229 // (including defaults). |
230 static bool APIHasBeenUsed(Profile* profile); | 230 static bool APIHasBeenUsed(Profile* profile); |
231 | 231 |
232 private: | 232 private: |
233 friend class MediaGalleriesPreferencesTest; | 233 friend class MediaGalleriesPreferencesTest; |
234 friend class MediaGalleriesPermissionsTest; | 234 friend class MediaGalleriesPermissionsTest; |
235 friend class MediaGalleriesPlatformAppBrowserTest; | |
vandebo (ex-Chrome)
2013/09/30 16:41:33
old?
tommycli
2013/10/01 16:29:48
Done.
| |
235 | 236 |
236 typedef std::map<std::string /*device id*/, MediaGalleryPrefIdSet> | 237 typedef std::map<std::string /*device id*/, MediaGalleryPrefIdSet> |
237 DeviceIdPrefIdsMap; | 238 DeviceIdPrefIdsMap; |
238 | 239 |
239 // These must be called on the UI thread. | 240 // These must be called on the UI thread. |
240 void OnInitializationCallbackReturned(); | 241 void OnInitializationCallbackReturned(); |
241 void FinishInitialization(); | 242 void FinishInitialization(); |
242 | 243 |
243 // Populates the default galleries if this is a fresh profile. | 244 // Populates the default galleries if this is a fresh profile. |
244 void AddDefaultGalleriesIfFreshProfile(); | 245 void AddDefaultGalleriesIfFreshProfile(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
321 // A mapping from device id to the set of gallery pref ids on that device. | 322 // A mapping from device id to the set of gallery pref ids on that device. |
322 // All pref ids in |device_map_| are also in |known_galleries_|. | 323 // All pref ids in |device_map_| are also in |known_galleries_|. |
323 DeviceIdPrefIdsMap device_map_; | 324 DeviceIdPrefIdsMap device_map_; |
324 | 325 |
325 ObserverList<GalleryChangeObserver> gallery_change_observers_; | 326 ObserverList<GalleryChangeObserver> gallery_change_observers_; |
326 | 327 |
327 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences); | 328 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences); |
328 }; | 329 }; |
329 | 330 |
330 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ | 331 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ |
OLD | NEW |