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

Unified Diff: chrome/browser/translate/translate_manager.h

Issue 7669051: Fixed crash on TranslateManager with multiple profiles. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager.h
diff --git a/chrome/browser/translate/translate_manager.h b/chrome/browser/translate/translate_manager.h
index 5fba25e4de7e2900faac74d864c25178031898da..7fd73e2f63cddf2c0ed87fdbab49b26cdbb2a14c 100644
--- a/chrome/browser/translate/translate_manager.h
+++ b/chrome/browser/translate/translate_manager.h
@@ -181,7 +181,11 @@ class TranslateManager : public NotificationObserver,
TabContents* tab);
NotificationRegistrar notification_registrar_;
- PrefChangeRegistrar pref_change_registrar_;
+
+ // Each PrefChangeRegistrar only tracks a single PrefService, so a map from
+ // each PrefService used to its registrar is needed.
+ typedef std::map<PrefService*, PrefChangeRegistrar*> PrefServiceRegistrarMap;
+ PrefServiceRegistrarMap pref_change_registrars_;
// A map that associates a profile with its parsed "accept languages".
typedef std::set<std::string> LanguageSet;
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698