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

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: Addressed Evan's comments Created 8 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) 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/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/prefs/public/pref_change_registrar.h" 19 #include "base/prefs/public/pref_change_registrar.h"
20 #include "base/prefs/public/pref_observer.h" 20 #include "base/prefs/public/pref_observer.h"
21 #include "base/string16.h" 21 #include "base/string16.h"
22 #include "chrome/browser/extensions/app_shortcut_manager.h" 22 #include "chrome/browser/extensions/app_shortcut_manager.h"
23 #include "chrome/browser/extensions/app_sync_bundle.h" 23 #include "chrome/browser/extensions/app_sync_bundle.h"
24 #include "chrome/browser/extensions/extension_icon_manager.h" 24 #include "chrome/browser/extensions/extension_icon_manager.h"
25 #include "chrome/browser/extensions/extension_prefs.h" 25 #include "chrome/browser/extensions/extension_prefs.h"
26 #include "chrome/browser/extensions/extension_process_manager.h" 26 #include "chrome/browser/extensions/extension_process_manager.h"
27 #include "chrome/browser/extensions/extension_sync_bundle.h" 27 #include "chrome/browser/extensions/extension_sync_bundle.h"
28 #include "chrome/browser/extensions/extension_toolbar_model.h" 28 #include "chrome/browser/extensions/extension_toolbar_model.h"
29 #include "chrome/browser/extensions/extension_warning_set.h"
30 #include "chrome/browser/extensions/extensions_quota_service.h" 29 #include "chrome/browser/extensions/extensions_quota_service.h"
31 #include "chrome/browser/extensions/external_provider_interface.h" 30 #include "chrome/browser/extensions/external_provider_interface.h"
32 #include "chrome/browser/extensions/menu_manager.h" 31 #include "chrome/browser/extensions/menu_manager.h"
33 #include "chrome/browser/extensions/pending_extension_manager.h" 32 #include "chrome/browser/extensions/pending_extension_manager.h"
34 #include "chrome/browser/extensions/process_map.h" 33 #include "chrome/browser/extensions/process_map.h"
35 #include "chrome/common/extensions/extension.h" 34 #include "chrome/common/extensions/extension.h"
36 #include "chrome/common/extensions/extension_constants.h" 35 #include "chrome/common/extensions/extension_constants.h"
37 #include "chrome/common/extensions/extension_set.h" 36 #include "chrome/common/extensions/extension_set.h"
38 #include "content/public/browser/notification_observer.h" 37 #include "content/public/browser/notification_observer.h"
39 #include "content/public/browser/notification_registrar.h" 38 #include "content/public/browser/notification_registrar.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 // Open a dev tools window for the background page for the given extension, 657 // Open a dev tools window for the background page for the given extension,
659 // starting the background page first if necesary. 658 // starting the background page first if necesary.
660 void InspectBackgroundPage(const extensions::Extension* extension); 659 void InspectBackgroundPage(const extensions::Extension* extension);
661 660
662 #if defined(UNIT_TEST) 661 #if defined(UNIT_TEST)
663 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { 662 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) {
664 TrackTerminatedExtension(extension); 663 TrackTerminatedExtension(extension);
665 } 664 }
666 #endif 665 #endif
667 666
668 ExtensionWarningSet* extension_warnings() {
669 return &extension_warnings_;
670 }
671
672 extensions::AppShortcutManager* app_shortcut_manager() { 667 extensions::AppShortcutManager* app_shortcut_manager() {
673 return &app_shortcut_manager_; 668 return &app_shortcut_manager_;
674 } 669 }
675 670
676 // Specialization of syncer::SyncableService::AsWeakPtr. 671 // Specialization of syncer::SyncableService::AsWeakPtr.
677 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } 672 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); }
678 673
679 bool browser_terminating() const { return browser_terminating_; } 674 bool browser_terminating() const { return browser_terminating_; }
680 675
681 // For testing. 676 // For testing.
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 // Set when the browser is terminating. Prevents us from installing or 943 // Set when the browser is terminating. Prevents us from installing or
949 // updating additional extensions and allows in-progress installations to 944 // updating additional extensions and allows in-progress installations to
950 // decide to abort. 945 // decide to abort.
951 bool browser_terminating_; 946 bool browser_terminating_;
952 947
953 NaClModuleInfoList nacl_module_list_; 948 NaClModuleInfoList nacl_module_list_;
954 949
955 extensions::AppSyncBundle app_sync_bundle_; 950 extensions::AppSyncBundle app_sync_bundle_;
956 extensions::ExtensionSyncBundle extension_sync_bundle_; 951 extensions::ExtensionSyncBundle extension_sync_bundle_;
957 952
958 // Contains an entry for each warning that shall be currently shown.
959 ExtensionWarningSet extension_warnings_;
960
961 extensions::ProcessMap process_map_; 953 extensions::ProcessMap process_map_;
962 954
963 extensions::AppShortcutManager app_shortcut_manager_; 955 extensions::AppShortcutManager app_shortcut_manager_;
964 956
965 scoped_ptr<ExtensionErrorUI> extension_error_ui_; 957 scoped_ptr<ExtensionErrorUI> extension_error_ui_;
966 958
967 #if defined(ENABLE_EXTENSIONS) 959 #if defined(ENABLE_EXTENSIONS)
968 scoped_ptr<extensions::ExtensionActionStorageManager> 960 scoped_ptr<extensions::ExtensionActionStorageManager>
969 extension_action_storage_manager_; 961 extension_action_storage_manager_;
970 #endif 962 #endif
971 963
972 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 964 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
973 InstallAppsWithUnlimtedStorage); 965 InstallAppsWithUnlimtedStorage);
974 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 966 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
975 InstallAppsAndCheckStorageProtection); 967 InstallAppsAndCheckStorageProtection);
976 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 968 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
977 }; 969 };
978 970
979 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 971 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698