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

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

Issue 8176001: Warn user in case extension delays network traffic too much. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merged with ToT Created 9 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
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 12 matching lines...) Expand all
23 #include "base/tuple.h" 23 #include "base/tuple.h"
24 #include "chrome/browser/extensions/apps_promo.h" 24 #include "chrome/browser/extensions/apps_promo.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_menu_manager.h" 26 #include "chrome/browser/extensions/extension_menu_manager.h"
27 #include "chrome/browser/extensions/extension_prefs.h" 27 #include "chrome/browser/extensions/extension_prefs.h"
28 #include "chrome/browser/extensions/extension_permissions_api.h" 28 #include "chrome/browser/extensions/extension_permissions_api.h"
29 #include "chrome/browser/extensions/extension_process_manager.h" 29 #include "chrome/browser/extensions/extension_process_manager.h"
30 #include "chrome/browser/extensions/extension_settings_frontend.h" 30 #include "chrome/browser/extensions/extension_settings_frontend.h"
31 #include "chrome/browser/extensions/extension_sync_data.h" 31 #include "chrome/browser/extensions/extension_sync_data.h"
32 #include "chrome/browser/extensions/extension_toolbar_model.h" 32 #include "chrome/browser/extensions/extension_toolbar_model.h"
33 #include "chrome/browser/extensions/extension_warning_set.h"
33 #include "chrome/browser/extensions/extensions_quota_service.h" 34 #include "chrome/browser/extensions/extensions_quota_service.h"
34 #include "chrome/browser/extensions/external_extension_provider_interface.h" 35 #include "chrome/browser/extensions/external_extension_provider_interface.h"
35 #include "chrome/browser/extensions/pending_extension_manager.h" 36 #include "chrome/browser/extensions/pending_extension_manager.h"
36 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" 37 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h"
37 #include "chrome/browser/prefs/pref_change_registrar.h" 38 #include "chrome/browser/prefs/pref_change_registrar.h"
38 #include "chrome/browser/sync/api/sync_change.h" 39 #include "chrome/browser/sync/api/sync_change.h"
39 #include "chrome/browser/sync/api/syncable_service.h" 40 #include "chrome/browser/sync/api/syncable_service.h"
40 #include "chrome/common/extensions/extension.h" 41 #include "chrome/common/extensions/extension.h"
41 #include "chrome/common/extensions/extension_constants.h" 42 #include "chrome/common/extensions/extension_constants.h"
42 #include "content/browser/browser_thread.h" 43 #include "content/browser/browser_thread.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 548
548 // |client| can be NULL for a silent install. 549 // |client| can be NULL for a silent install.
549 scoped_refptr<CrxInstaller> MakeCrxInstaller(ExtensionInstallUI* client); 550 scoped_refptr<CrxInstaller> MakeCrxInstaller(ExtensionInstallUI* client);
550 551
551 #if defined(UNIT_TEST) 552 #if defined(UNIT_TEST)
552 void TrackTerminatedExtensionForTest(const Extension* extension) { 553 void TrackTerminatedExtensionForTest(const Extension* extension) {
553 TrackTerminatedExtension(extension); 554 TrackTerminatedExtension(extension);
554 } 555 }
555 #endif 556 #endif
556 557
558 ExtensionWarningSet* extension_warnings() {
559 return &extension_warnings_;
560 }
561
557 private: 562 private:
558 // Bundle of type (app or extension)-specific sync stuff. 563 // Bundle of type (app or extension)-specific sync stuff.
559 struct SyncBundle { 564 struct SyncBundle {
560 SyncBundle(); 565 SyncBundle();
561 ~SyncBundle(); 566 ~SyncBundle();
562 567
563 bool HasExtensionId(const std::string& id) const; 568 bool HasExtensionId(const std::string& id) const;
564 bool HasPendingExtensionId(const std::string& id) const; 569 bool HasPendingExtensionId(const std::string& id) const;
565 570
566 ExtensionFilter filter; 571 ExtensionFilter filter;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 // Set to true by OnExternalExtensionUpdateUrlFound() when an external 815 // Set to true by OnExternalExtensionUpdateUrlFound() when an external
811 // extension URL is found. Used in CheckForExternalUpdates() to see 816 // extension URL is found. Used in CheckForExternalUpdates() to see
812 // if an update check is needed to install pending extensions. 817 // if an update check is needed to install pending extensions.
813 bool external_extension_url_added_; 818 bool external_extension_url_added_;
814 819
815 NaClModuleInfoList nacl_module_list_; 820 NaClModuleInfoList nacl_module_list_;
816 821
817 SyncBundle app_sync_bundle_; 822 SyncBundle app_sync_bundle_;
818 SyncBundle extension_sync_bundle_; 823 SyncBundle extension_sync_bundle_;
819 824
825 // Contains an entry for each warning that shall be currently shown.
826 ExtensionWarningSet extension_warnings_;
827
820 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 828 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
821 InstallAppsWithUnlimtedStorage); 829 InstallAppsWithUnlimtedStorage);
822 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 830 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
823 InstallAppsAndCheckStorageProtection); 831 InstallAppsAndCheckStorageProtection);
824 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 832 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
825 }; 833 };
826 834
827 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 835 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_global_error_badge.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698