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

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

Issue 7349020: Don't show a prompt when loading an extension with NPAPI plugins via (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit test fix Created 9 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 void GrantPermissions(const Extension* extension); 318 void GrantPermissions(const Extension* extension);
319 319
320 // Updates the |extension|'s granted permissions lists to include all 320 // Updates the |extension|'s granted permissions lists to include all
321 // permissions in the |extension|'s manifest and re-enables the 321 // permissions in the |extension|'s manifest and re-enables the
322 // extension. 322 // extension.
323 void GrantPermissionsAndEnableExtension(const Extension* extension); 323 void GrantPermissionsAndEnableExtension(const Extension* extension);
324 324
325 // Loads the extension from the directory |extension_path|. 325 // Loads the extension from the directory |extension_path|.
326 void LoadExtension(const FilePath& extension_path); 326 void LoadExtension(const FilePath& extension_path);
327 327
328 // Same as above, but for use with command line switch --load-extension=path.
329 void LoadExtensionFromCommandLine(const FilePath& extension_path);
330
328 // Loads any component extensions. 331 // Loads any component extensions.
329 void LoadComponentExtensions(); 332 void LoadComponentExtensions();
330 333
331 // Loads particular component extension. 334 // Loads particular component extension.
332 const Extension* LoadComponentExtension(const ComponentExtensionInfo& info); 335 const Extension* LoadComponentExtension(const ComponentExtensionInfo& info);
333 336
334 // Unloads particular component extension. 337 // Unloads particular component extension.
335 void UnloadComponentExtension(const ComponentExtensionInfo& info); 338 void UnloadComponentExtension(const ComponentExtensionInfo& info);
336 339
337 // Loads all known extensions (used by startup and testing code). 340 // Loads all known extensions (used by startup and testing code).
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 393
391 // Called when the initial extensions load has completed. 394 // Called when the initial extensions load has completed.
392 virtual void OnLoadedInstalledExtensions(); 395 virtual void OnLoadedInstalledExtensions();
393 396
394 // Adds |extension| to this ExtensionService and notifies observers than an 397 // Adds |extension| to this ExtensionService and notifies observers than an
395 // extension has been loaded. Called by the backend after an extension has 398 // extension has been loaded. Called by the backend after an extension has
396 // been loaded from a file and installed. 399 // been loaded from a file and installed.
397 void AddExtension(const Extension* extension); 400 void AddExtension(const Extension* extension);
398 401
399 // Called by the backend when an unpacked extension has been loaded. 402 // Called by the backend when an unpacked extension has been loaded.
400 void OnLoadSingleExtension(const Extension* extension); 403 void OnLoadSingleExtension(const Extension* extension,
404 bool prompt_for_plugins);
401 405
402 // Called by the backend when an extension has been installed. 406 // Called by the backend when an extension has been installed.
403 void OnExtensionInstalled( 407 void OnExtensionInstalled(
404 const Extension* extension, bool from_webstore); 408 const Extension* extension, bool from_webstore);
405 409
406 // Checks if the privileges requested by |extension| have increased, and if 410 // Checks if the privileges requested by |extension| have increased, and if
407 // so, disables the extension and prompts the user to approve the change. 411 // so, disables the extension and prompts the user to approve the change.
408 void DisableIfPrivilegeIncrease(const Extension* extension); 412 void DisableIfPrivilegeIncrease(const Extension* extension);
409 413
410 // Go through each extensions in pref, unload blacklisted extensions 414 // Go through each extensions in pref, unload blacklisted extensions
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 NaClModuleInfoList nacl_module_list_; 745 NaClModuleInfoList nacl_module_list_;
742 746
743 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 747 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
744 InstallAppsWithUnlimtedStorage); 748 InstallAppsWithUnlimtedStorage);
745 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 749 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
746 InstallAppsAndCheckStorageProtection); 750 InstallAppsAndCheckStorageProtection);
747 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 751 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
748 }; 752 };
749 753
750 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 754 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698