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

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 10854009: Extension white and force lists (set by policy) should have priority over auto-updated Google black… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased and merged Created 8 years, 4 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
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_EXTENSIONS_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 bool include_disabled) const = 0; 112 bool include_disabled) const = 0;
113 virtual const extensions::Extension* GetInstalledExtension( 113 virtual const extensions::Extension* GetInstalledExtension(
114 const std::string& id) const = 0; 114 const std::string& id) const = 0;
115 115
116 virtual bool IsExtensionEnabled(const std::string& extension_id) const = 0; 116 virtual bool IsExtensionEnabled(const std::string& extension_id) const = 0;
117 virtual bool IsExternalExtensionUninstalled( 117 virtual bool IsExternalExtensionUninstalled(
118 const std::string& extension_id) const = 0; 118 const std::string& extension_id) const = 0;
119 119
120 virtual void UpdateExtensionBlacklist( 120 virtual void UpdateExtensionBlacklist(
121 const std::vector<std::string>& blacklist) = 0; 121 const std::vector<std::string>& blacklist) = 0;
122 virtual void CheckAdminBlacklist() = 0; 122 virtual void CheckManagementPolicy() = 0;
123 123
124 // Safe to call multiple times in a row. 124 // Safe to call multiple times in a row.
125 // 125 //
126 // TODO(akalin): Remove this method (and others) once we refactor 126 // TODO(akalin): Remove this method (and others) once we refactor
127 // themes sync to not use it directly. 127 // themes sync to not use it directly.
128 virtual void CheckForUpdatesSoon() = 0; 128 virtual void CheckForUpdatesSoon() = 0;
129 129
130 virtual void AddExtension(const extensions::Extension* extension) = 0; 130 virtual void AddExtension(const extensions::Extension* extension) = 0;
131 131
132 virtual void UnloadExtension( 132 virtual void UnloadExtension(
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 // Initializes the |extension|'s active permission set and disables the 405 // Initializes the |extension|'s active permission set and disables the
406 // extension if the privilege level has increased (e.g., due to an upgrade). 406 // extension if the privilege level has increased (e.g., due to an upgrade).
407 void InitializePermissions(const extensions::Extension* extension); 407 void InitializePermissions(const extensions::Extension* extension);
408 408
409 // Go through each extensions in pref, unload blacklisted extensions 409 // Go through each extensions in pref, unload blacklisted extensions
410 // and update the blacklist state in pref. 410 // and update the blacklist state in pref.
411 virtual void UpdateExtensionBlacklist( 411 virtual void UpdateExtensionBlacklist(
412 const std::vector<std::string>& blacklist) OVERRIDE; 412 const std::vector<std::string>& blacklist) OVERRIDE;
413 413
414 // Go through each extension and unload those that the network admin has 414 // Go through each extension and unload those that are not allowed to run by
415 // put on the blacklist (not to be confused with the Google-managed blacklist) 415 // management policy providers (ie. network admin and Google-managed
416 // set of extensions. 416 // blacklist).
417 virtual void CheckAdminBlacklist() OVERRIDE; 417 virtual void CheckManagementPolicy() OVERRIDE;
418 418
419 virtual void CheckForUpdatesSoon() OVERRIDE; 419 virtual void CheckForUpdatesSoon() OVERRIDE;
420 420
421 // syncer::SyncableService implementation. 421 // syncer::SyncableService implementation.
422 virtual syncer::SyncError MergeDataAndStartSyncing( 422 virtual syncer::SyncError MergeDataAndStartSyncing(
423 syncer::ModelType type, 423 syncer::ModelType type,
424 const syncer::SyncDataList& initial_sync_data, 424 const syncer::SyncDataList& initial_sync_data,
425 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, 425 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
426 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE; 426 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
427 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; 427 virtual void StopSyncing(syncer::ModelType type) OVERRIDE;
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 #endif 868 #endif
869 869
870 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 870 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
871 InstallAppsWithUnlimtedStorage); 871 InstallAppsWithUnlimtedStorage);
872 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 872 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
873 InstallAppsAndCheckStorageProtection); 873 InstallAppsAndCheckStorageProtection);
874 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 874 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
875 }; 875 };
876 876
877 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 877 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698