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

Side by Side Diff: base/prefs/pref_change_registrar.h

Issue 290083006: Store a stacktrace of PrefService destruction in PrefChangeRegistrar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor improvements Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/prefs/pref_change_registrar.cc » ('j') | base/prefs/pref_change_registrar.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_PREFS_PREF_CHANGE_REGISTRAR_H_ 5 #ifndef BASE_PREFS_PREF_CHANGE_REGISTRAR_H_
6 #define BASE_PREFS_PREF_CHANGE_REGISTRAR_H_ 6 #define BASE_PREFS_PREF_CHANGE_REGISTRAR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool IsManaged(); 59 bool IsManaged();
60 60
61 // Return the PrefService for this registrar. 61 // Return the PrefService for this registrar.
62 PrefService* prefs(); 62 PrefService* prefs();
63 const PrefService* prefs() const; 63 const PrefService* prefs() const;
64 64
65 private: 65 private:
66 // PrefObserver: 66 // PrefObserver:
67 virtual void OnPreferenceChanged(PrefService* service, 67 virtual void OnPreferenceChanged(PrefService* service,
68 const std::string& pref_name) OVERRIDE; 68 const std::string& pref_name) OVERRIDE;
69 // TODO(battre): Remove function (debugging tool for crbug.com/373435).
engedy 2014/05/16 15:19:58 nit: I am not sure saying "debugging tool" is too
battre 2014/05/16 15:58:37 Done.
70 virtual void SetPrefServiceDestructionTrace(
71 const std::string& stacktrace) OVERRIDE;
69 72
70 static void InvokeUnnamedCallback(const base::Closure& callback, 73 static void InvokeUnnamedCallback(const base::Closure& callback,
71 const std::string& pref_name); 74 const std::string& pref_name);
72 75
73 typedef std::map<std::string, NamedChangeCallback> ObserverMap; 76 typedef std::map<std::string, NamedChangeCallback> ObserverMap;
74 77
75 ObserverMap observers_; 78 ObserverMap observers_;
76 PrefService* service_; 79 PrefService* service_;
80 // TODO(battre): Remove attribute (debugging tool for crbug.com/373435).
81 std::string pref_service_destruction_;
77 82
78 DISALLOW_COPY_AND_ASSIGN(PrefChangeRegistrar); 83 DISALLOW_COPY_AND_ASSIGN(PrefChangeRegistrar);
79 }; 84 };
80 85
81 #endif // BASE_PREFS_PREF_CHANGE_REGISTRAR_H_ 86 #endif // BASE_PREFS_PREF_CHANGE_REGISTRAR_H_
OLDNEW
« no previous file with comments | « no previous file | base/prefs/pref_change_registrar.cc » ('j') | base/prefs/pref_change_registrar.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698