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

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

Issue 417843004: Remove (Set)IsBeingReloaded from ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 virtual bool OnExternalExtensionUpdateUrlFound( 219 virtual bool OnExternalExtensionUpdateUrlFound(
220 const std::string& id, 220 const std::string& id,
221 const std::string& install_parameter, 221 const std::string& install_parameter,
222 const GURL& update_url, 222 const GURL& update_url,
223 extensions::Manifest::Location location, 223 extensions::Manifest::Location location,
224 int creation_flags, 224 int creation_flags,
225 bool mark_acknowledged) OVERRIDE; 225 bool mark_acknowledged) OVERRIDE;
226 virtual void OnExternalProviderReady( 226 virtual void OnExternalProviderReady(
227 const extensions::ExternalProviderInterface* provider) OVERRIDE; 227 const extensions::ExternalProviderInterface* provider) OVERRIDE;
228 228
229 // Getter and setter for the flag that specifies whether the extension is
230 // being reloaded.
231 bool IsBeingReloaded(const std::string& extension_id) const;
232 void SetBeingReloaded(const std::string& extension_id, bool value);
233
234 // Initialize and start all installed extensions. 229 // Initialize and start all installed extensions.
235 void Init(); 230 void Init();
236 231
237 // Called when the associated Profile is going to be destroyed. 232 // Called when the associated Profile is going to be destroyed.
238 void Shutdown(); 233 void Shutdown();
239 234
240 // Reloads the specified extension, sending the onLaunched() event to it if it 235 // Reloads the specified extension, sending the onLaunched() event to it if it
241 // currently has any window showing. 236 // currently has any window showing.
242 // Allows noisy failures. 237 // Allows noisy failures.
243 void ReloadExtension(const std::string& extension_id); 238 void ReloadExtension(const std::string& extension_id);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 // allow background processing of garbage collection of on-disk state without 647 // allow background processing of garbage collection of on-disk state without
653 // needing to worry about race conditions caused by extension installation and 648 // needing to worry about race conditions caused by extension installation and
654 // reinstallation. 649 // reinstallation.
655 bool installs_delayed_for_gc_; 650 bool installs_delayed_for_gc_;
656 651
657 // Set to true if this is the first time this ExtensionService has run. 652 // Set to true if this is the first time this ExtensionService has run.
658 // Used for specially handling external extensions that are installed the 653 // Used for specially handling external extensions that are installed the
659 // first time. 654 // first time.
660 bool is_first_run_; 655 bool is_first_run_;
661 656
662 // TODO(rdevlin.cronin): Okay, clearly something is very wrong with this
663 // picture...
664 // A set of the extension ids currently being reloaded. We use this to
665 // avoid showing a "new install" notice for an extension reinstall.
666 std::set<std::string> extensions_being_reloaded_;
667 // Store the ids of reloading extensions. We use this to re-enable extensions 657 // Store the ids of reloading extensions. We use this to re-enable extensions
668 // which were disabled for a reload. 658 // which were disabled for a reload.
669 std::set<std::string> reloading_extensions_; 659 std::set<std::string> reloading_extensions_;
670 660
671 // A set of the extension ids currently being terminated. We use this to 661 // A set of the extension ids currently being terminated. We use this to
672 // avoid trying to unload the same extension twice. 662 // avoid trying to unload the same extension twice.
673 std::set<std::string> extensions_being_terminated_; 663 std::set<std::string> extensions_being_terminated_;
674 664
675 // The controller for the UI that alerts the user about any blacklisted 665 // The controller for the UI that alerts the user about any blacklisted
676 // extensions. 666 // extensions.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 GreylistedExtensionDisabled); 700 GreylistedExtensionDisabled);
711 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 701 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
712 GreylistDontEnableManuallyDisabled); 702 GreylistDontEnableManuallyDisabled);
713 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 703 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
714 GreylistUnknownDontChange); 704 GreylistUnknownDontChange);
715 705
716 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 706 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
717 }; 707 };
718 708
719 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 709 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698