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

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: Cleanup 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 535
535 // |client| can be NULL for a silent install. 536 // |client| can be NULL for a silent install.
536 scoped_refptr<CrxInstaller> MakeCrxInstaller(ExtensionInstallUI* client); 537 scoped_refptr<CrxInstaller> MakeCrxInstaller(ExtensionInstallUI* client);
537 538
538 #if defined(UNIT_TEST) 539 #if defined(UNIT_TEST)
539 void TrackTerminatedExtensionForTest(const Extension* extension) { 540 void TrackTerminatedExtensionForTest(const Extension* extension) {
540 TrackTerminatedExtension(extension); 541 TrackTerminatedExtension(extension);
541 } 542 }
542 #endif 543 #endif
543 544
545 ExtensionWarningSet* extension_warnings() {
546 return &extension_warnings_;
547 }
548
544 private: 549 private:
545 // Bundle of type (app or extension)-specific sync stuff. 550 // Bundle of type (app or extension)-specific sync stuff.
546 struct SyncBundle { 551 struct SyncBundle {
547 SyncBundle(); 552 SyncBundle();
548 ~SyncBundle(); 553 ~SyncBundle();
549 554
550 bool HasExtensionId(const std::string& id) const; 555 bool HasExtensionId(const std::string& id) const;
551 bool HasPendingExtensionId(const std::string& id) const; 556 bool HasPendingExtensionId(const std::string& id) const;
552 557
553 ExtensionFilter filter; 558 ExtensionFilter filter;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 // Set to true by OnExternalExtensionUpdateUrlFound() when an external 802 // Set to true by OnExternalExtensionUpdateUrlFound() when an external
798 // extension URL is found. Used in CheckForExternalUpdates() to see 803 // extension URL is found. Used in CheckForExternalUpdates() to see
799 // if an update check is needed to install pending extensions. 804 // if an update check is needed to install pending extensions.
800 bool external_extension_url_added_; 805 bool external_extension_url_added_;
801 806
802 NaClModuleInfoList nacl_module_list_; 807 NaClModuleInfoList nacl_module_list_;
803 808
804 SyncBundle app_sync_bundle_; 809 SyncBundle app_sync_bundle_;
805 SyncBundle extension_sync_bundle_; 810 SyncBundle extension_sync_bundle_;
806 811
812 // Contains an entry for each warning that shall be currently shown.
813 ExtensionWarningSet extension_warnings_;
814
807 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 815 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
808 InstallAppsWithUnlimtedStorage); 816 InstallAppsWithUnlimtedStorage);
809 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 817 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
810 InstallAppsAndCheckStorageProtection); 818 InstallAppsAndCheckStorageProtection);
811 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 819 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
812 }; 820 };
813 821
814 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 822 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698