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

Side by Side Diff: chrome/browser/prefs/pref_model_associator.h

Issue 8879016: Add more per-tab preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CHECK -> DCHECK Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // Register a preference with the specified name for syncing. We do not care 53 // Register a preference with the specified name for syncing. We do not care
54 // about the type at registration time, but when changes arrive from the 54 // about the type at registration time, but when changes arrive from the
55 // syncer, we check if they can be applied and if not drop them. 55 // syncer, we check if they can be applied and if not drop them.
56 // Note: This should only be called at profile startup time (before sync 56 // Note: This should only be called at profile startup time (before sync
57 // begins). 57 // begins).
58 virtual void RegisterPref(const char* name); 58 virtual void RegisterPref(const char* name);
59 59
60 // Returns true if the specified preference is registered for syncing. 60 // Returns true if the specified preference is registered for syncing.
61 virtual bool IsPrefRegistered(const char* name); 61 virtual bool IsPrefRegistered(const char* name);
62 62
63 // Unregisters a previously registered preference. This must be called
64 // prior to making the first sync.
65 virtual void UnregisterPref(const char* name);
66
63 // Process a local preference change. This can trigger new SyncChanges being 67 // Process a local preference change. This can trigger new SyncChanges being
64 // sent to the syncer. 68 // sent to the syncer.
65 virtual void ProcessPrefChange(const std::string& name); 69 virtual void ProcessPrefChange(const std::string& name);
66 70
67 void SetPrefService(PrefService* pref_service); 71 void SetPrefService(PrefService* pref_service);
68 72
69 // Merges the value of local_pref into the supplied server_value and returns 73 // Merges the value of local_pref into the supplied server_value and returns
70 // the result (caller takes ownership). If there is a conflict, the server 74 // the result (caller takes ownership). If there is a conflict, the server
71 // value always takes precedence. Note that only certain preferences will 75 // value always takes precedence. Note that only certain preferences will
72 // actually be merged, all others will return a copy of the server value. See 76 // actually be merged, all others will return a copy of the server value. See
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // The PrefService we are syncing to. 140 // The PrefService we are syncing to.
137 PrefService* pref_service_; 141 PrefService* pref_service_;
138 142
139 // Sync's SyncChange handler. We push all our changes through this. 143 // Sync's SyncChange handler. We push all our changes through this.
140 SyncChangeProcessor* sync_processor_; 144 SyncChangeProcessor* sync_processor_;
141 145
142 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); 146 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator);
143 }; 147 };
144 148
145 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ 149 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/per_tab_user_pref_store.cc ('k') | chrome/browser/prefs/pref_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698