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

Side by Side Diff: base/prefs/public/pref_member.h

Issue 12086018: GTTF: Add missing virtual destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots 4 Created 7 years, 10 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 | « base/prefs/public/pref_change_registrar.h ('k') | base/threading/post_task_and_reply_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // A helper class that stays in sync with a preference (bool, int, real, 5 // A helper class that stays in sync with a preference (bool, int, real,
6 // string or filepath). For example: 6 // string or filepath). For example:
7 // 7 //
8 // class MyClass { 8 // class MyClass {
9 // public: 9 // public:
10 // MyClass(PrefService* prefs) { 10 // MyClass(PrefService* prefs) {
(...skipping 24 matching lines...) Expand all
35 #include "base/memory/ref_counted.h" 35 #include "base/memory/ref_counted.h"
36 #include "base/message_loop_proxy.h" 36 #include "base/message_loop_proxy.h"
37 #include "base/prefs/base_prefs_export.h" 37 #include "base/prefs/base_prefs_export.h"
38 #include "base/prefs/pref_observer.h" 38 #include "base/prefs/pref_observer.h"
39 #include "base/values.h" 39 #include "base/values.h"
40 40
41 class PrefServiceBase; 41 class PrefServiceBase;
42 42
43 namespace subtle { 43 namespace subtle {
44 44
45 class BASE_PREFS_EXPORT PrefMemberBase : public PrefObserver { 45 class BASE_PREFS_EXPORT PrefMemberBase
46 : public NON_EXPORTED_BASE(PrefObserver) {
46 public: 47 public:
47 // Type of callback you can register if you need to know the name of 48 // Type of callback you can register if you need to know the name of
48 // the pref that is changing. 49 // the pref that is changing.
49 typedef base::Callback<void(const std::string&)> NamedChangeCallback; 50 typedef base::Callback<void(const std::string&)> NamedChangeCallback;
50 51
51 PrefServiceBase* prefs() { return prefs_; } 52 PrefServiceBase* prefs() { return prefs_; }
52 const PrefServiceBase* prefs() const { return prefs_; } 53 const PrefServiceBase* prefs() const { return prefs_; }
53 54
54 protected: 55 protected:
55 class BASE_PREFS_EXPORT Internal 56 class BASE_PREFS_EXPORT Internal
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 344
344 typedef PrefMember<bool> BooleanPrefMember; 345 typedef PrefMember<bool> BooleanPrefMember;
345 typedef PrefMember<int> IntegerPrefMember; 346 typedef PrefMember<int> IntegerPrefMember;
346 typedef PrefMember<double> DoublePrefMember; 347 typedef PrefMember<double> DoublePrefMember;
347 typedef PrefMember<std::string> StringPrefMember; 348 typedef PrefMember<std::string> StringPrefMember;
348 typedef PrefMember<FilePath> FilePathPrefMember; 349 typedef PrefMember<FilePath> FilePathPrefMember;
349 // This preference member is expensive for large string arrays. 350 // This preference member is expensive for large string arrays.
350 typedef PrefMember<std::vector<std::string> > StringListPrefMember; 351 typedef PrefMember<std::vector<std::string> > StringListPrefMember;
351 352
352 #endif // BASE_PREFS_PUBLIC_PREF_MEMBER_H_ 353 #endif // BASE_PREFS_PUBLIC_PREF_MEMBER_H_
OLDNEW
« no previous file with comments | « base/prefs/public/pref_change_registrar.h ('k') | base/threading/post_task_and_reply_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698