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

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

Issue 6903127: [Sync] Add support for enabling/disabling an extension before it's installed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // to ExtensionPrefs some other way. 269 // to ExtensionPrefs some other way.
270 virtual bool UninstallExtension(const std::string& extension_id, 270 virtual bool UninstallExtension(const std::string& extension_id,
271 bool external_uninstall, 271 bool external_uninstall,
272 std::string* error); 272 std::string* error);
273 273
274 virtual bool IsExtensionEnabled( 274 virtual bool IsExtensionEnabled(
275 const std::string& extension_id) const OVERRIDE; 275 const std::string& extension_id) const OVERRIDE;
276 virtual bool IsExternalExtensionUninstalled( 276 virtual bool IsExternalExtensionUninstalled(
277 const std::string& extension_id) const OVERRIDE; 277 const std::string& extension_id) const OVERRIDE;
278 278
279 // Enable or disable an extension. No action if the extension is already 279 // Enabled the extension. If the extension is already enabled, does
asargent_no_longer_on_chrome 2011/04/29 17:12:59 typo: "Enabled the extension"
akalin 2011/04/29 18:29:43 Done.
280 // enabled/disabled. 280 // nothing.
281 virtual void EnableExtension(const std::string& extension_id); 281 virtual void EnableExtension(const std::string& extension_id);
282
283 // Disables the extension. If the extension is already disabled, or
284 // cannot be disabled, does nothing.
282 virtual void DisableExtension(const std::string& extension_id); 285 virtual void DisableExtension(const std::string& extension_id);
283 286
284 // Updates the |extension|'s granted permissions lists to include all 287 // Updates the |extension|'s granted permissions lists to include all
285 // permissions in the |extension|'s manifest. 288 // permissions in the |extension|'s manifest.
286 void GrantPermissions(const Extension* extension); 289 void GrantPermissions(const Extension* extension);
287 290
288 // Updates the |extension|'s granted permissions lists to include all 291 // Updates the |extension|'s granted permissions lists to include all
289 // permissions in the |extension|'s manifest and re-enables the 292 // permissions in the |extension|'s manifest and re-enables the
290 // extension. 293 // extension.
291 void GrantPermissionsAndEnableExtension(const Extension* extension); 294 void GrantPermissionsAndEnableExtension(const Extension* extension);
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 NaClModuleInfoList nacl_module_list_; 676 NaClModuleInfoList nacl_module_list_;
674 677
675 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 678 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
676 InstallAppsWithUnlimtedStorage); 679 InstallAppsWithUnlimtedStorage);
677 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 680 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
678 InstallAppsAndCheckStorageProtection); 681 InstallAppsAndCheckStorageProtection);
679 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 682 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
680 }; 683 };
681 684
682 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 685 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_pref_value_map.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698