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

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

Issue 4687005: Track permissions granted to extensions in prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: incorporate feedback Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_EXTENSIONS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // TODO(aa): Remove |external_uninstall| -- this information should be passed 266 // TODO(aa): Remove |external_uninstall| -- this information should be passed
267 // to ExtensionPrefs some other way. 267 // to ExtensionPrefs some other way.
268 void UninstallExtension(const std::string& extension_id, 268 void UninstallExtension(const std::string& extension_id,
269 bool external_uninstall); 269 bool external_uninstall);
270 270
271 // Enable or disable an extension. No action if the extension is already 271 // Enable or disable an extension. No action if the extension is already
272 // enabled/disabled. 272 // enabled/disabled.
273 void EnableExtension(const std::string& extension_id); 273 void EnableExtension(const std::string& extension_id);
274 void DisableExtension(const std::string& extension_id); 274 void DisableExtension(const std::string& extension_id);
275 275
276 // Updates the |extension|'s granted permissions lists to include all
277 // permissions in the |extension|'s manifest.
278 void GrantPermissions(const Extension* extension);
279
280 // Updates the |extension|'s granted permissions lists to include all
281 // permissions in the |extension|'s manifest and re-enables the
282 // extension.
283 void GrantPermissionsAndEnableExtension(const Extension* extension);
284
276 // Load the extension from the directory |extension_path|. 285 // Load the extension from the directory |extension_path|.
277 void LoadExtension(const FilePath& extension_path); 286 void LoadExtension(const FilePath& extension_path);
278 287
279 // Load any component extensions. 288 // Load any component extensions.
280 void LoadComponentExtensions(); 289 void LoadComponentExtensions();
281 290
282 // Load all known extensions (used by startup and testing code). 291 // Load all known extensions (used by startup and testing code).
283 void LoadAllExtensions(); 292 void LoadAllExtensions();
284 293
285 // Continues loading all know extensions. It can be called from 294 // Continues loading all know extensions. It can be called from
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, 583 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest,
575 UpdatePendingExtensionAlreadyInstalled); 584 UpdatePendingExtensionAlreadyInstalled);
576 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, 585 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest,
577 InstallAppsWithUnlimtedStorage); 586 InstallAppsWithUnlimtedStorage);
578 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, 587 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest,
579 InstallAppsAndCheckStorageProtection); 588 InstallAppsAndCheckStorageProtection);
580 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); 589 DISALLOW_COPY_AND_ASSIGN(ExtensionsService);
581 }; 590 };
582 591
583 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ 592 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698