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

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

Issue 10836228: Convert multiple boolean params to mask in getExtensionByIdInternal. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments and rebase Created 8 years, 4 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 const; 662 const;
663 663
664 // Handles setting the extension specific values in |extension_sync_data| to 664 // Handles setting the extension specific values in |extension_sync_data| to
665 // the current system. 665 // the current system.
666 // Returns false if the changes were not completely applied and need to be 666 // Returns false if the changes were not completely applied and need to be
667 // tried again later. 667 // tried again later.
668 bool ProcessExtensionSyncDataHelper( 668 bool ProcessExtensionSyncDataHelper(
669 const extensions::ExtensionSyncData& extension_sync_data, 669 const extensions::ExtensionSyncData& extension_sync_data,
670 syncer::ModelType type); 670 syncer::ModelType type);
671 671
672 enum IncludeFlag {
673 INCLUDE_NONE = 0,
674 INCLUDE_ENABLED = 1 << 0,
675 INCLUDE_DISABLED = 1 << 1,
676 INCLUDE_TERMINATED = 1 << 2
677 };
678
672 // Look up an extension by ID, optionally including either or both of enabled 679 // Look up an extension by ID, optionally including either or both of enabled
673 // and disabled extensions. 680 // and disabled extensions.
674 const extensions::Extension* GetExtensionByIdInternal( 681 const extensions::Extension* GetExtensionByIdInternal(
675 const std::string& id, 682 const std::string& id,
676 bool include_enabled, 683 int include_mask) const;
677 bool include_disabled,
678 bool include_terminated) const;
679 684
680 // Adds the given extension to the list of terminated extensions if 685 // Adds the given extension to the list of terminated extensions if
681 // it is not already there and unloads it. 686 // it is not already there and unloads it.
682 void TrackTerminatedExtension(const extensions::Extension* extension); 687 void TrackTerminatedExtension(const extensions::Extension* extension);
683 688
684 // Removes the extension with the given id from the list of 689 // Removes the extension with the given id from the list of
685 // terminated extensions if it is there. 690 // terminated extensions if it is there.
686 void UntrackTerminatedExtension(const std::string& id); 691 void UntrackTerminatedExtension(const std::string& id);
687 692
688 // Handles sending notification that |extension| was loaded. 693 // Handles sending notification that |extension| was loaded.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 #endif 868 #endif
864 869
865 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 870 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
866 InstallAppsWithUnlimtedStorage); 871 InstallAppsWithUnlimtedStorage);
867 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 872 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
868 InstallAppsAndCheckStorageProtection); 873 InstallAppsAndCheckStorageProtection);
869 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 874 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
870 }; 875 };
871 876
872 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 877 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | chrome/browser/extensions/extension_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698