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

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

Issue 10407105: Improve error messaging of webRequest API in case of conflicts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 2 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 10 matching lines...) Expand all
21 #include "base/time.h" 21 #include "base/time.h"
22 #include "base/tuple.h" 22 #include "base/tuple.h"
23 #include "chrome/browser/api/prefs/pref_change_registrar.h" 23 #include "chrome/browser/api/prefs/pref_change_registrar.h"
24 #include "chrome/browser/extensions/app_shortcut_manager.h" 24 #include "chrome/browser/extensions/app_shortcut_manager.h"
25 #include "chrome/browser/extensions/app_sync_bundle.h" 25 #include "chrome/browser/extensions/app_sync_bundle.h"
26 #include "chrome/browser/extensions/extension_icon_manager.h" 26 #include "chrome/browser/extensions/extension_icon_manager.h"
27 #include "chrome/browser/extensions/extension_prefs.h" 27 #include "chrome/browser/extensions/extension_prefs.h"
28 #include "chrome/browser/extensions/extension_process_manager.h" 28 #include "chrome/browser/extensions/extension_process_manager.h"
29 #include "chrome/browser/extensions/extension_sync_bundle.h" 29 #include "chrome/browser/extensions/extension_sync_bundle.h"
30 #include "chrome/browser/extensions/extension_toolbar_model.h" 30 #include "chrome/browser/extensions/extension_toolbar_model.h"
31 #include "chrome/browser/extensions/extension_warning_set.h"
32 #include "chrome/browser/extensions/extensions_quota_service.h" 31 #include "chrome/browser/extensions/extensions_quota_service.h"
33 #include "chrome/browser/extensions/external_provider_interface.h" 32 #include "chrome/browser/extensions/external_provider_interface.h"
34 #include "chrome/browser/extensions/menu_manager.h" 33 #include "chrome/browser/extensions/menu_manager.h"
35 #include "chrome/browser/extensions/pending_extension_manager.h" 34 #include "chrome/browser/extensions/pending_extension_manager.h"
36 #include "chrome/browser/extensions/process_map.h" 35 #include "chrome/browser/extensions/process_map.h"
37 #include "chrome/common/extensions/extension.h" 36 #include "chrome/common/extensions/extension.h"
38 #include "chrome/common/extensions/extension_constants.h" 37 #include "chrome/common/extensions/extension_constants.h"
39 #include "chrome/common/extensions/extension_set.h" 38 #include "chrome/common/extensions/extension_set.h"
40 #include "content/public/browser/browser_thread.h" 39 #include "content/public/browser/browser_thread.h"
41 #include "content/public/browser/notification_observer.h" 40 #include "content/public/browser/notification_observer.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 // Open a dev tools window for the background page for the given extension, 620 // Open a dev tools window for the background page for the given extension,
622 // starting the background page first if necesary. 621 // starting the background page first if necesary.
623 void InspectBackgroundPage(const extensions::Extension* extension); 622 void InspectBackgroundPage(const extensions::Extension* extension);
624 623
625 #if defined(UNIT_TEST) 624 #if defined(UNIT_TEST)
626 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { 625 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) {
627 TrackTerminatedExtension(extension); 626 TrackTerminatedExtension(extension);
628 } 627 }
629 #endif 628 #endif
630 629
631 ExtensionWarningSet* extension_warnings() {
632 return &extension_warnings_;
633 }
634
635 extensions::AppShortcutManager* app_shortcut_manager() { 630 extensions::AppShortcutManager* app_shortcut_manager() {
636 return &app_shortcut_manager_; 631 return &app_shortcut_manager_;
637 } 632 }
638 633
639 // Specialization of syncer::SyncableService::AsWeakPtr. 634 // Specialization of syncer::SyncableService::AsWeakPtr.
640 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } 635 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); }
641 636
642 private: 637 private:
643 // Contains Extension data that can change during the life of the process, 638 // Contains Extension data that can change during the life of the process,
644 // but does not persist across restarts. 639 // but does not persist across restarts.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 // has to wait for the external providers. Used in 866 // has to wait for the external providers. Used in
872 // OnAllExternalProvidersReady() to determine if an update check is needed to 867 // OnAllExternalProvidersReady() to determine if an update check is needed to
873 // install pending extensions. 868 // install pending extensions.
874 bool update_once_all_providers_are_ready_; 869 bool update_once_all_providers_are_ready_;
875 870
876 NaClModuleInfoList nacl_module_list_; 871 NaClModuleInfoList nacl_module_list_;
877 872
878 extensions::AppSyncBundle app_sync_bundle_; 873 extensions::AppSyncBundle app_sync_bundle_;
879 extensions::ExtensionSyncBundle extension_sync_bundle_; 874 extensions::ExtensionSyncBundle extension_sync_bundle_;
880 875
881 // Contains an entry for each warning that shall be currently shown.
882 ExtensionWarningSet extension_warnings_;
883
884 extensions::ProcessMap process_map_; 876 extensions::ProcessMap process_map_;
885 877
886 extensions::AppShortcutManager app_shortcut_manager_; 878 extensions::AppShortcutManager app_shortcut_manager_;
887 879
888 scoped_ptr<ExtensionErrorUI> extension_error_ui_; 880 scoped_ptr<ExtensionErrorUI> extension_error_ui_;
889 881
890 #if defined(ENABLE_EXTENSIONS) 882 #if defined(ENABLE_EXTENSIONS)
891 scoped_ptr<extensions::ExtensionActionStorageManager> 883 scoped_ptr<extensions::ExtensionActionStorageManager>
892 extension_action_storage_manager_; 884 extension_action_storage_manager_;
893 #endif 885 #endif
894 886
895 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 887 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
896 InstallAppsWithUnlimtedStorage); 888 InstallAppsWithUnlimtedStorage);
897 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 889 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
898 InstallAppsAndCheckStorageProtection); 890 InstallAppsAndCheckStorageProtection);
899 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 891 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
900 }; 892 };
901 893
902 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 894 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698