Index: chrome/browser/extensions/api/declarative/rules_registry_with_cache.h |
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_with_cache.h b/chrome/browser/extensions/api/declarative/rules_registry_with_cache.h |
index 3bbf8e87db1b9d7367ce8299b5aef945bfa03f6f..c95a8033e62e2aac1aa6b87c7eecaf7f91bf3cf8 100644 |
--- a/chrome/browser/extensions/api/declarative/rules_registry_with_cache.h |
+++ b/chrome/browser/extensions/api/declarative/rules_registry_with_cache.h |
@@ -29,6 +29,7 @@ namespace extensions { |
// in the RuleStorageOnUI object. |
class RulesRegistryWithCache : public RulesRegistry { |
public: |
+ typedef std::vector<linked_ptr<RulesRegistry::Rule> > RulesVector; |
// RuleStorageOnUI implements the part of the RulesRegistry which works on |
// the UI thread. It should only be used on the UI thread. It gets created |
// by the RulesRegistry, but right after that it changes owner to the |
@@ -49,7 +50,7 @@ class RulesRegistryWithCache : public RulesRegistry { |
void Init(); |
void WriteToStorage(const std::string& extension_id, |
- scoped_ptr<base::Value> value); |
+ scoped_ptr<RulesVector> new_rules); |
base::WeakPtr<RuleStorageOnUI> GetWeakPtr() { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
@@ -162,9 +163,7 @@ class RulesRegistryWithCache : public RulesRegistry { |
private: |
typedef std::string ExtensionId; |
typedef std::string RuleId; |
- typedef std::pair<ExtensionId, RuleId> RulesDictionaryKey; |
- typedef std::map<RulesDictionaryKey, linked_ptr<RulesRegistry::Rule> > |
- RulesDictionary; |
+ typedef std::map<RuleId, linked_ptr<RulesRegistry::Rule> > RulesDictionary; |
// Common processing after extension's rules have changed. |
void ProcessChangedRules(const std::string& extension_id); |
@@ -178,7 +177,7 @@ class RulesRegistryWithCache : public RulesRegistry { |
scoped_ptr<base::Value> rules); |
- RulesDictionary rules_; |
+ std::map<ExtensionId, RulesDictionary> rules_; |
battre
2013/05/07 16:22:09
This variable is going to be deleted with my CL. I
|
std::vector<base::Closure> ready_callbacks_; |