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

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

Issue 12211029: Sanity tweaks to the extension blacklist: check all extensions at once on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more test fixes Created 7 years, 10 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) 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 <set> 10 #include <set>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 class SequencedTaskRunner; 54 class SequencedTaskRunner;
55 } 55 }
56 56
57 namespace extensions { 57 namespace extensions {
58 class AppNotificationManager; 58 class AppNotificationManager;
59 class AppSyncData; 59 class AppSyncData;
60 class BrowserEventRouter; 60 class BrowserEventRouter;
61 class ComponentLoader; 61 class ComponentLoader;
62 class ContentSettingsStore; 62 class ContentSettingsStore;
63 class CrxInstaller; 63 class CrxInstaller;
64 class Extension;
65 class ExtensionActionStorageManager; 64 class ExtensionActionStorageManager;
66 class ExtensionSyncData; 65 class ExtensionSyncData;
67 class ExtensionSystem; 66 class ExtensionSystem;
68 class ExtensionUpdater; 67 class ExtensionUpdater;
69 class PendingExtensionManager; 68 class PendingExtensionManager;
70 class SettingsFrontend; 69 class SettingsFrontend;
71 } 70 }
72 71
73 namespace syncer { 72 namespace syncer {
74 class SyncErrorFactory; 73 class SyncErrorFactory;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // permissions the given extension has been granted. 420 // permissions the given extension has been granted.
422 bool ExtensionBindingsAllowed(const GURL& url); 421 bool ExtensionBindingsAllowed(const GURL& url);
423 422
424 // Returns true if a normal browser window should avoid showing |url| in a 423 // Returns true if a normal browser window should avoid showing |url| in a
425 // tab. In this case, |url| is also rewritten to an error URL. 424 // tab. In this case, |url| is also rewritten to an error URL.
426 bool ShouldBlockUrlInBrowserTab(GURL* url); 425 bool ShouldBlockUrlInBrowserTab(GURL* url);
427 426
428 // Called when the initial extensions load has completed. 427 // Called when the initial extensions load has completed.
429 virtual void OnLoadedInstalledExtensions(); 428 virtual void OnLoadedInstalledExtensions();
430 429
431 // Adds |extension| to this ExtensionService and notifies observers than an 430 // Adds |extension| to this ExtensionService and notifies observers that the
432 // extension has been loaded. Called by the backend after an extension has 431 // extensions have been loaded.
433 // been loaded from a file and installed.
434 virtual void AddExtension(const extensions::Extension* extension) OVERRIDE; 432 virtual void AddExtension(const extensions::Extension* extension) OVERRIDE;
435 433
436 // Check if we have preferences for the component extension and, if not or if 434 // Check if we have preferences for the component extension and, if not or if
437 // the stored version differs, install the extension (without requirements 435 // the stored version differs, install the extension (without requirements
438 // checking) before calling AddExtension. 436 // checking) before calling AddExtension.
439 virtual void AddComponentExtension(const extensions::Extension* extension) 437 virtual void AddComponentExtension(const extensions::Extension* extension)
440 OVERRIDE; 438 OVERRIDE;
441 439
442 // Called by the backend when an extension has been installed. 440 // Informs the service that an extension's files are in place for loading.
441 //
442 // Please make sure the Blacklist is checked some time before calling this
443 // method.
443 void OnExtensionInstalled( 444 void OnExtensionInstalled(
444 const extensions::Extension* extension, 445 const extensions::Extension* extension,
445 const syncer::StringOrdinal& page_ordinal, 446 const syncer::StringOrdinal& page_ordinal,
446 bool has_requirement_errors, 447 bool has_requirement_errors,
447 bool wait_for_idle); 448 bool wait_for_idle);
448 449
449 // Similar to FinishInstallation, but first checks if there still is an update 450 // Similar to FinishInstallation, but first checks if there still is an update
450 // pending for the extension, and makes sure the extension is still idle. 451 // pending for the extension, and makes sure the extension is still idle.
451 void MaybeFinishDelayedInstallation(const std::string& extension_id); 452 void MaybeFinishDelayedInstallation(const std::string& extension_id);
452 453
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 #endif 1004 #endif
1004 1005
1005 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1006 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1006 InstallAppsWithUnlimtedStorage); 1007 InstallAppsWithUnlimtedStorage);
1007 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1008 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1008 InstallAppsAndCheckStorageProtection); 1009 InstallAppsAndCheckStorageProtection);
1009 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 1010 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
1010 }; 1011 };
1011 1012
1012 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 1013 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_ui_default.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698