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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 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
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 <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // extensions have been loaded. 153 // extensions have been loaded.
154 virtual void AddExtension(const extensions::Extension* extension) = 0; 154 virtual void AddExtension(const extensions::Extension* extension) = 0;
155 155
156 // Check if we have preferences for the component extension and, if not or if 156 // Check if we have preferences for the component extension and, if not or if
157 // the stored version differs, install the extension (without requirements 157 // the stored version differs, install the extension (without requirements
158 // checking) before calling AddExtension. 158 // checking) before calling AddExtension.
159 virtual void AddComponentExtension( 159 virtual void AddComponentExtension(
160 const extensions::Extension* extension) = 0; 160 const extensions::Extension* extension) = 0;
161 161
162 // Unload the specified extension. 162 // Unload the specified extension.
163 virtual void UnloadExtension( 163 virtual void UnloadExtension(const std::string& extension_id,
164 const std::string& extension_id, 164 extensions::UnloadedExtensionReason reason) = 0;
165 extensions::UnloadedExtensionInfo::Reason reason) = 0;
166 165
167 // Remove the specified component extension. 166 // Remove the specified component extension.
168 virtual void RemoveComponentExtension(const std::string& extension_id) = 0; 167 virtual void RemoveComponentExtension(const std::string& extension_id) = 0;
169 168
170 // Whether the extension service is ready. 169 // Whether the extension service is ready.
171 virtual bool is_ready() = 0; 170 virtual bool is_ready() = 0;
172 171
173 // Returns task runner for crx installation file I/O operations. 172 // Returns task runner for crx installation file I/O operations.
174 virtual base::SequencedTaskRunner* GetFileTaskRunner() = 0; 173 virtual base::SequencedTaskRunner* GetFileTaskRunner() = 0;
175 }; 174 };
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 extensions::PendingExtensionManager* pending_extension_manager() override; 207 extensions::PendingExtensionManager* pending_extension_manager() override;
209 const extensions::Extension* GetExtensionById( 208 const extensions::Extension* GetExtensionById(
210 const std::string& id, 209 const std::string& id,
211 bool include_disabled) const override; 210 bool include_disabled) const override;
212 const extensions::Extension* GetInstalledExtension( 211 const extensions::Extension* GetInstalledExtension(
213 const std::string& id) const override; 212 const std::string& id) const override;
214 bool UpdateExtension(const extensions::CRXFileInfo& file, 213 bool UpdateExtension(const extensions::CRXFileInfo& file,
215 bool file_ownership_passed, 214 bool file_ownership_passed,
216 extensions::CrxInstaller** out_crx_installer) override; 215 extensions::CrxInstaller** out_crx_installer) override;
217 bool IsExtensionEnabled(const std::string& extension_id) const override; 216 bool IsExtensionEnabled(const std::string& extension_id) const override;
218 void UnloadExtension( 217 void UnloadExtension(const std::string& extension_id,
219 const std::string& extension_id, 218 extensions::UnloadedExtensionReason reason) override;
220 extensions::UnloadedExtensionInfo::Reason reason) override;
221 void RemoveComponentExtension(const std::string& extension_id) override; 219 void RemoveComponentExtension(const std::string& extension_id) override;
222 void AddExtension(const extensions::Extension* extension) override; 220 void AddExtension(const extensions::Extension* extension) override;
223 void AddComponentExtension(const extensions::Extension* extension) override; 221 void AddComponentExtension(const extensions::Extension* extension) override;
224 const extensions::Extension* GetPendingExtensionUpdate( 222 const extensions::Extension* GetPendingExtensionUpdate(
225 const std::string& extension_id) const override; 223 const std::string& extension_id) const override;
226 void FinishDelayedInstallation(const std::string& extension_id) override; 224 void FinishDelayedInstallation(const std::string& extension_id) override;
227 void CheckManagementPolicy() override; 225 void CheckManagementPolicy() override;
228 void CheckForUpdatesSoon() override; 226 void CheckForUpdatesSoon() override;
229 bool is_ready() override; 227 bool is_ready() override;
230 base::SequencedTaskRunner* GetFileTaskRunner() override; 228 base::SequencedTaskRunner* GetFileTaskRunner() override;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 518
521 // Handles sending notification that |extension| was loaded. 519 // Handles sending notification that |extension| was loaded.
522 void NotifyExtensionLoaded(const extensions::Extension* extension); 520 void NotifyExtensionLoaded(const extensions::Extension* extension);
523 521
524 // Completes extension loading after URLRequestContexts have been updated 522 // Completes extension loading after URLRequestContexts have been updated
525 // on the IO thread. 523 // on the IO thread.
526 void OnExtensionRegisteredWithRequestContexts( 524 void OnExtensionRegisteredWithRequestContexts(
527 scoped_refptr<const extensions::Extension> extension); 525 scoped_refptr<const extensions::Extension> extension);
528 526
529 // Handles sending notification that |extension| was unloaded. 527 // Handles sending notification that |extension| was unloaded.
530 void NotifyExtensionUnloaded( 528 void NotifyExtensionUnloaded(const extensions::Extension* extension,
531 const extensions::Extension* extension, 529 extensions::UnloadedExtensionReason reason);
532 extensions::UnloadedExtensionInfo::Reason reason);
533 530
534 // Common helper to finish installing the given extension. 531 // Common helper to finish installing the given extension.
535 void FinishInstallation(const extensions::Extension* extension); 532 void FinishInstallation(const extensions::Extension* extension);
536 533
537 // Disables the extension if the privilege level has increased 534 // Disables the extension if the privilege level has increased
538 // (e.g., due to an upgrade). 535 // (e.g., due to an upgrade).
539 void CheckPermissionsIncrease(const extensions::Extension* extension, 536 void CheckPermissionsIncrease(const extensions::Extension* extension,
540 bool is_extension_loaded); 537 bool is_extension_loaded);
541 538
542 // Helper that updates the active extension list used for crash reporting. 539 // Helper that updates the active extension list used for crash reporting.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 GreylistUnknownDontChange); 748 GreylistUnknownDontChange);
752 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 749 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
753 ManagementPolicyProhibitsEnableOnInstalled); 750 ManagementPolicyProhibitsEnableOnInstalled);
754 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 751 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
755 BlockAndUnblockBlacklistedExtension); 752 BlockAndUnblockBlacklistedExtension);
756 753
757 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 754 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
758 }; 755 };
759 756
760 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 757 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_protocols_unittest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698