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

Unified Diff: extensions/browser/api/declarative/rules_registry.h

Issue 780713002: Fix remaining WeakPtrFactory ordering problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/hid/hid_service_linux.h ('k') | extensions/browser/api/hid/hid_device_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/declarative/rules_registry.h
diff --git a/extensions/browser/api/declarative/rules_registry.h b/extensions/browser/api/declarative/rules_registry.h
index 4fc3178050f5301f1dc825606f8440012fa63f70..76f1c0878447ebc9ca9a105fa1073ea00c09fddc 100644
--- a/extensions/browser/api/declarative/rules_registry.h
+++ b/extensions/browser/api/declarative/rules_registry.h
@@ -260,10 +260,6 @@ class RulesRegistry : public base::RefCountedThreadSafe<RulesRegistry> {
RuleIdentifiersMap used_rule_identifiers_;
int last_generated_rule_identifier_id_;
- // The factory needs to be declared before |cache_delegate_|, so that it can
- // produce a pointer as a construction argument for |cache_delegate_|.
- base::WeakPtrFactory<RulesRegistry> weak_ptr_factory_;
-
// |cache_delegate_| is owned by the registry service. If |cache_delegate_| is
// NULL, then the storage functionality is disabled (this is used in tests).
// This registry cannot own |cache_delegate_| because during the time after
@@ -273,6 +269,8 @@ class RulesRegistry : public base::RefCountedThreadSafe<RulesRegistry> {
// instance.
base::WeakPtr<RulesCacheDelegate> cache_delegate_;
+ base::WeakPtrFactory<RulesRegistry> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(RulesRegistry);
};
« no previous file with comments | « device/hid/hid_service_linux.h ('k') | extensions/browser/api/hid/hid_device_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698