Index: chrome/browser/extensions/api/declarative/declarative_rule.h |
diff --git a/chrome/browser/extensions/api/declarative/declarative_rule.h b/chrome/browser/extensions/api/declarative/declarative_rule.h |
index b06ae7004eca48dc190a61cafb20a18592d2b422..8e15acf877f12eef61e5a1f1aed0c29d1c0c2fcf 100644 |
--- a/chrome/browser/extensions/api/declarative/declarative_rule.h |
+++ b/chrome/browser/extensions/api/declarative/declarative_rule.h |
@@ -156,6 +156,12 @@ class DeclarativeActionSet { |
const base::Time& extension_install_time, |
typename ActionT::ApplyInfo* apply_info) const; |
+ // Rules call this method when their conditions are fulfilled, but Apply has |
+ // already been called. |
+ void Reapply(const std::string& extension_id, |
+ const base::Time& extension_install_time, |
+ typename ActionT::ApplyInfo* apply_info) const; |
+ |
// Rules call this method when they have stateful conditions, and those |
// conditions stop being fulfilled. Rules with event-based conditions (e.g. a |
// network request happened) will never Revert() an action. |
@@ -384,6 +390,16 @@ void DeclarativeActionSet<ActionT>::Apply( |
} |
template<typename ActionT> |
+void DeclarativeActionSet<ActionT>::Reapply( |
+ const std::string& extension_id, |
+ const base::Time& extension_install_time, |
+ typename ActionT::ApplyInfo* apply_info) const { |
+ for (typename Actions::const_iterator i = actions_.begin(); |
+ i != actions_.end(); ++i) |
+ (*i)->Reapply(extension_id, extension_install_time, apply_info); |
+} |
+ |
+template<typename ActionT> |
void DeclarativeActionSet<ActionT>::Revert( |
const std::string& extension_id, |
const base::Time& extension_install_time, |