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

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

Issue 14757022: Add a non-blocking "OneShotEvent" class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename Latch to OneShotEvent Created 7 years, 7 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 20 matching lines...) Expand all
31 #include "chrome/browser/extensions/menu_manager.h" 31 #include "chrome/browser/extensions/menu_manager.h"
32 #include "chrome/browser/extensions/pending_extension_manager.h" 32 #include "chrome/browser/extensions/pending_extension_manager.h"
33 #include "chrome/browser/extensions/process_map.h" 33 #include "chrome/browser/extensions/process_map.h"
34 #include "chrome/browser/extensions/update_observer.h" 34 #include "chrome/browser/extensions/update_observer.h"
35 #include "chrome/common/extensions/extension.h" 35 #include "chrome/common/extensions/extension.h"
36 #include "chrome/common/extensions/extension_constants.h" 36 #include "chrome/common/extensions/extension_constants.h"
37 #include "chrome/common/extensions/extension_set.h" 37 #include "chrome/common/extensions/extension_set.h"
38 #include "chrome/common/extensions/manifest.h" 38 #include "chrome/common/extensions/manifest.h"
39 #include "content/public/browser/notification_observer.h" 39 #include "content/public/browser/notification_observer.h"
40 #include "content/public/browser/notification_registrar.h" 40 #include "content/public/browser/notification_registrar.h"
41 #include "extensions/common/one_shot_event.h"
41 #include "sync/api/string_ordinal.h" 42 #include "sync/api/string_ordinal.h"
42 #include "sync/api/sync_change.h" 43 #include "sync/api/sync_change.h"
43 #include "sync/api/syncable_service.h" 44 #include "sync/api/syncable_service.h"
44 45
45 class CommandLine; 46 class CommandLine;
46 class ExtensionErrorUI; 47 class ExtensionErrorUI;
47 class ExtensionSyncData; 48 class ExtensionSyncData;
48 class ExtensionToolbarModel; 49 class ExtensionToolbarModel;
49 class GURL; 50 class GURL;
50 class Profile; 51 class Profile;
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 702
702 struct NaClModuleInfo { 703 struct NaClModuleInfo {
703 NaClModuleInfo(); 704 NaClModuleInfo();
704 ~NaClModuleInfo(); 705 ~NaClModuleInfo();
705 706
706 GURL url; 707 GURL url;
707 std::string mime_type; 708 std::string mime_type;
708 }; 709 };
709 typedef std::list<NaClModuleInfo> NaClModuleInfoList; 710 typedef std::list<NaClModuleInfo> NaClModuleInfoList;
710 711
711 // Sets the ready_ flag and sends a notification to the listeners. 712 // Sets is_ready and sends a notification to the listeners.
712 void SetReadyAndNotifyListeners(); 713 void SetReadyAndNotifyListeners();
713 714
714 // Return true if the sync type of |extension| matches |type|. 715 // Return true if the sync type of |extension| matches |type|.
715 bool IsCorrectSyncType(const extensions::Extension& extension, 716 bool IsCorrectSyncType(const extensions::Extension& extension,
716 syncer::ModelType type) 717 syncer::ModelType type)
717 const; 718 const;
718 719
719 void OnExtensionInstallPrefChanged(); 720 void OnExtensionInstallPrefChanged();
720 721
721 // Handles setting the extension specific values in |extension_sync_data| to 722 // Handles setting the extension specific values in |extension_sync_data| to
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 // Whether to notify users when they attempt to install an extension. 897 // Whether to notify users when they attempt to install an extension.
897 bool show_extensions_prompts_; 898 bool show_extensions_prompts_;
898 899
899 // Whether to delay installing of extension updates until the extension is 900 // Whether to delay installing of extension updates until the extension is
900 // idle. 901 // idle.
901 bool install_updates_when_idle_; 902 bool install_updates_when_idle_;
902 903
903 // Used by dispatchers to limit API quota for individual extensions. 904 // Used by dispatchers to limit API quota for individual extensions.
904 ExtensionsQuotaService quota_service_; 905 ExtensionsQuotaService quota_service_;
905 906
906 // Record that Init() has been called, and chrome::EXTENSIONS_READY
907 // has fired.
908 bool ready_;
909
910 // Our extension updater, if updates are turned on. 907 // Our extension updater, if updates are turned on.
911 scoped_ptr<extensions::ExtensionUpdater> updater_; 908 scoped_ptr<extensions::ExtensionUpdater> updater_;
912 909
913 // The model that tracks extensions with BrowserAction buttons. 910 // The model that tracks extensions with BrowserAction buttons.
914 ExtensionToolbarModel toolbar_model_; 911 ExtensionToolbarModel toolbar_model_;
915 912
916 // Map unloaded extensions' ids to their paths. When a temporarily loaded 913 // Map unloaded extensions' ids to their paths. When a temporarily loaded
917 // extension is unloaded, we lose the information about it and don't have 914 // extension is unloaded, we lose the information about it and don't have
918 // any in the extension preferences file. 915 // any in the extension preferences file.
919 typedef std::map<std::string, base::FilePath> UnloadedExtensionPathMap; 916 typedef std::map<std::string, base::FilePath> UnloadedExtensionPathMap;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 ObserverList<extensions::UpdateObserver, true> update_observers_; 998 ObserverList<extensions::UpdateObserver, true> update_observers_;
1002 999
1003 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1000 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1004 InstallAppsWithUnlimtedStorage); 1001 InstallAppsWithUnlimtedStorage);
1005 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1002 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1006 InstallAppsAndCheckStorageProtection); 1003 InstallAppsAndCheckStorageProtection);
1007 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 1004 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
1008 }; 1005 };
1009 1006
1010 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 1007 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698