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

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: Attempt to fix windows compilation 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>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/file_path.h" 15 #include "base/file_path.h"
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/memory/linked_ptr.h" 17 #include "base/memory/linked_ptr.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/string16.h" 20 #include "base/string16.h"
21 #include "base/tuple.h" 21 #include "base/tuple.h"
22 #include "chrome/browser/api/prefs/pref_change_registrar.h" 22 #include "chrome/browser/api/prefs/pref_change_registrar.h"
23 #include "chrome/browser/extensions/app_shortcut_manager.h" 23 #include "chrome/browser/extensions/app_shortcut_manager.h"
24 #include "chrome/browser/extensions/app_sync_bundle.h" 24 #include "chrome/browser/extensions/app_sync_bundle.h"
25 #include "chrome/browser/extensions/extension_icon_manager.h" 25 #include "chrome/browser/extensions/extension_icon_manager.h"
26 #include "chrome/browser/extensions/extension_prefs.h" 26 #include "chrome/browser/extensions/extension_prefs.h"
27 #include "chrome/browser/extensions/extension_process_manager.h" 27 #include "chrome/browser/extensions/extension_process_manager.h"
28 #include "chrome/browser/extensions/extension_sync_bundle.h" 28 #include "chrome/browser/extensions/extension_sync_bundle.h"
29 #include "chrome/browser/extensions/extension_toolbar_model.h" 29 #include "chrome/browser/extensions/extension_toolbar_model.h"
30 #include "chrome/browser/extensions/extension_warning_set.h"
31 #include "chrome/browser/extensions/extensions_quota_service.h" 30 #include "chrome/browser/extensions/extensions_quota_service.h"
32 #include "chrome/browser/extensions/external_provider_interface.h" 31 #include "chrome/browser/extensions/external_provider_interface.h"
33 #include "chrome/browser/extensions/menu_manager.h" 32 #include "chrome/browser/extensions/menu_manager.h"
34 #include "chrome/browser/extensions/pending_extension_manager.h" 33 #include "chrome/browser/extensions/pending_extension_manager.h"
35 #include "chrome/browser/extensions/process_map.h" 34 #include "chrome/browser/extensions/process_map.h"
36 #include "chrome/common/extensions/extension.h" 35 #include "chrome/common/extensions/extension.h"
37 #include "chrome/common/extensions/extension_constants.h" 36 #include "chrome/common/extensions/extension_constants.h"
38 #include "chrome/common/extensions/extension_set.h" 37 #include "chrome/common/extensions/extension_set.h"
39 #include "content/public/browser/browser_thread.h" 38 #include "content/public/browser/browser_thread.h"
40 #include "content/public/browser/notification_observer.h" 39 #include "content/public/browser/notification_observer.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 // Open a dev tools window for the background page for the given extension, 628 // Open a dev tools window for the background page for the given extension,
630 // starting the background page first if necesary. 629 // starting the background page first if necesary.
631 void InspectBackgroundPage(const extensions::Extension* extension); 630 void InspectBackgroundPage(const extensions::Extension* extension);
632 631
633 #if defined(UNIT_TEST) 632 #if defined(UNIT_TEST)
634 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { 633 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) {
635 TrackTerminatedExtension(extension); 634 TrackTerminatedExtension(extension);
636 } 635 }
637 #endif 636 #endif
638 637
639 ExtensionWarningSet* extension_warnings() {
640 return &extension_warnings_;
641 }
642
643 extensions::AppShortcutManager* app_shortcut_manager() { 638 extensions::AppShortcutManager* app_shortcut_manager() {
644 return &app_shortcut_manager_; 639 return &app_shortcut_manager_;
645 } 640 }
646 641
647 // Specialization of syncer::SyncableService::AsWeakPtr. 642 // Specialization of syncer::SyncableService::AsWeakPtr.
648 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } 643 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); }
649 644
650 private: 645 private:
651 // Contains Extension data that can change during the life of the process, 646 // Contains Extension data that can change during the life of the process,
652 // but does not persist across restarts. 647 // but does not persist across restarts.
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 // has to wait for the external providers. Used in 872 // has to wait for the external providers. Used in
878 // OnAllExternalProvidersReady() to determine if an update check is needed to 873 // OnAllExternalProvidersReady() to determine if an update check is needed to
879 // install pending extensions. 874 // install pending extensions.
880 bool update_once_all_providers_are_ready_; 875 bool update_once_all_providers_are_ready_;
881 876
882 NaClModuleInfoList nacl_module_list_; 877 NaClModuleInfoList nacl_module_list_;
883 878
884 extensions::AppSyncBundle app_sync_bundle_; 879 extensions::AppSyncBundle app_sync_bundle_;
885 extensions::ExtensionSyncBundle extension_sync_bundle_; 880 extensions::ExtensionSyncBundle extension_sync_bundle_;
886 881
887 // Contains an entry for each warning that shall be currently shown.
888 ExtensionWarningSet extension_warnings_;
889
890 extensions::ProcessMap process_map_; 882 extensions::ProcessMap process_map_;
891 883
892 extensions::AppShortcutManager app_shortcut_manager_; 884 extensions::AppShortcutManager app_shortcut_manager_;
893 885
894 scoped_ptr<ExtensionErrorUI> extension_error_ui_; 886 scoped_ptr<ExtensionErrorUI> extension_error_ui_;
895 887
896 #if defined(ENABLE_EXTENSIONS) 888 #if defined(ENABLE_EXTENSIONS)
897 scoped_ptr<extensions::ExtensionActionStorageManager> 889 scoped_ptr<extensions::ExtensionActionStorageManager>
898 extension_action_storage_manager_; 890 extension_action_storage_manager_;
899 #endif 891 #endif
900 892
901 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 893 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
902 InstallAppsWithUnlimtedStorage); 894 InstallAppsWithUnlimtedStorage);
903 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 895 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
904 InstallAppsAndCheckStorageProtection); 896 InstallAppsAndCheckStorageProtection);
905 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 897 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
906 }; 898 };
907 899
908 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 900 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698