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_EXTENSIONS_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // Find the right launch container based on the launch type. | 318 // Find the right launch container based on the launch type. |
319 // If |extension|'s prefs do not have a launch type set, then | 319 // If |extension|'s prefs do not have a launch type set, then |
320 // use |default_pref_value|. | 320 // use |default_pref_value|. |
321 extension_misc::LaunchContainer GetLaunchContainer( | 321 extension_misc::LaunchContainer GetLaunchContainer( |
322 const Extension* extension, | 322 const Extension* extension, |
323 LaunchType default_pref_value); | 323 LaunchType default_pref_value); |
324 | 324 |
325 // Set and retrieve permissions for media galleries as identified by the | 325 // Set and retrieve permissions for media galleries as identified by the |
326 // gallery id. | 326 // gallery id. |
327 void SetMediaGalleryPermission(const std::string& extension_id, | 327 void SetMediaGalleryPermission(const std::string& extension_id, |
328 MediaGalleryPrefId gallery, bool has_access); | 328 chrome::MediaGalleryPrefId gallery, |
329 std::vector<MediaGalleryPermission> GetMediaGalleryPermissions( | 329 bool has_access); |
| 330 void UnsetMediaGalleryPermission(const std::string& extension_id, |
| 331 chrome::MediaGalleryPrefId gallery); |
| 332 std::vector<chrome::MediaGalleryPermission> GetMediaGalleryPermissions( |
330 const std::string& extension_id); | 333 const std::string& extension_id); |
331 void RemoveMediaGalleryPermissions(MediaGalleryPrefId gallery_id); | 334 void RemoveMediaGalleryPermissions(chrome::MediaGalleryPrefId gallery_id); |
332 | 335 |
333 // Saves ExtensionInfo for each installed extension with the path to the | 336 // Saves ExtensionInfo for each installed extension with the path to the |
334 // version directory and the location. Blacklisted extensions won't be saved | 337 // version directory and the location. Blacklisted extensions won't be saved |
335 // and neither will external extensions the user has explicitly uninstalled. | 338 // and neither will external extensions the user has explicitly uninstalled. |
336 // Caller takes ownership of returned structure. | 339 // Caller takes ownership of returned structure. |
337 ExtensionsInfo* GetInstalledExtensionsInfo(); | 340 ExtensionsInfo* GetInstalledExtensionsInfo(); |
338 | 341 |
339 // Returns the ExtensionInfo from the prefs for the given extension. If the | 342 // Returns the ExtensionInfo from the prefs for the given extension. If the |
340 // extension is not present, NULL is returned. | 343 // extension is not present, NULL is returned. |
341 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id); | 344 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id); |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 scoped_ptr<ExtensionSorting> extension_sorting_; | 570 scoped_ptr<ExtensionSorting> extension_sorting_; |
568 | 571 |
569 scoped_refptr<ContentSettingsStore> content_settings_store_; | 572 scoped_refptr<ContentSettingsStore> content_settings_store_; |
570 | 573 |
571 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 574 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
572 }; | 575 }; |
573 | 576 |
574 } // namespace extensions | 577 } // namespace extensions |
575 | 578 |
576 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 579 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
OLD | NEW |