Index: chrome/browser/extensions/declarative_user_script_manager.h |
diff --git a/chrome/browser/extensions/declarative_user_script_manager.h b/chrome/browser/extensions/declarative_user_script_manager.h |
index ba50ce2014ab063d19ebe888a507b05424561e56..6beafb78ce06ed2e850d317457b2548633b9dd7a 100644 |
--- a/chrome/browser/extensions/declarative_user_script_manager.h |
+++ b/chrome/browser/extensions/declarative_user_script_manager.h |
@@ -9,6 +9,7 @@ |
#include "base/macros.h" |
#include "base/memory/linked_ptr.h" |
+#include "extensions/common/consumer.h" |
class Profile; |
@@ -21,17 +22,21 @@ class DeclarativeUserScriptManager { |
explicit DeclarativeUserScriptManager(Profile* profile); |
~DeclarativeUserScriptManager(); |
- // Get the user script master for declarative scripts; if one does not exist, |
- // a new object will be created. |
- DeclarativeUserScriptMaster* GetDeclarativeUserScriptMasterByID( |
- const std::string& id); |
+ // Gets the user script master for declarative scripts by the given |
+ // ConsumerID; if one does not exist, a new object will be created. |
+ linked_ptr<DeclarativeUserScriptMaster> GetDeclarativeUserScriptMasterByID( |
Devlin
2015/01/14 16:45:08
Again, no linked_ptr (assume this goes for all Dec
Xi Han
2015/01/14 23:46:02
Updated.
|
+ const ConsumerID& id); |
private: |
using UserScriptMasterMap = |
- std::map<std::string, linked_ptr<DeclarativeUserScriptMaster>>; |
+ std::map<ConsumerID, linked_ptr<DeclarativeUserScriptMaster>>; |
- // A map of DeclarativeUserScriptMasters for ids; each master is lazily |
- // initialized. |
+ // Creates a DeclarativeUserScriptMaster object. |
+ linked_ptr<DeclarativeUserScriptMaster> CreateDeclarativeUserScriptMaster( |
+ const ConsumerID& consumer_id); |
+ |
+ // A map of DeclarativeUserScriptMasters for ConsumerIDs; each master |
+ // is lazily initialized. |
UserScriptMasterMap declarative_user_script_masters_; |
Profile* profile_; |
@@ -39,6 +44,6 @@ class DeclarativeUserScriptManager { |
DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptManager); |
}; |
-} // extensions |
+} // namespace extensions |
#endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_ |