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

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

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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 | « chrome/browser/prefs/pref_model_associator.h ('k') | chrome/browser/prefs/pref_service.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 #include "chrome/browser/prefs/pref_model_associator.h" 5 #include "chrome/browser/prefs/pref_model_associator.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 15 matching lines...) Expand all
26 pref_service_(NULL) { 26 pref_service_(NULL) {
27 DCHECK(CalledOnValidThread()); 27 DCHECK(CalledOnValidThread());
28 } 28 }
29 29
30 PrefModelAssociator::~PrefModelAssociator() { 30 PrefModelAssociator::~PrefModelAssociator() {
31 DCHECK(CalledOnValidThread()); 31 DCHECK(CalledOnValidThread());
32 pref_service_ = NULL; 32 pref_service_ = NULL;
33 } 33 }
34 34
35 void PrefModelAssociator::InitPrefAndAssociate( 35 void PrefModelAssociator::InitPrefAndAssociate(
36 const csync::SyncData& sync_pref, 36 const syncer::SyncData& sync_pref,
37 const std::string& pref_name, 37 const std::string& pref_name,
38 csync::SyncChangeList* sync_changes) { 38 syncer::SyncChangeList* sync_changes) {
39 const PrefService::Preference* pref = 39 const PrefService::Preference* pref =
40 pref_service_->FindPreference(pref_name.c_str()); 40 pref_service_->FindPreference(pref_name.c_str());
41 DCHECK(pref); 41 DCHECK(pref);
42 VLOG(1) << "Associating preference " << pref_name; 42 VLOG(1) << "Associating preference " << pref_name;
43 43
44 base::JSONReader reader; 44 base::JSONReader reader;
45 if (sync_pref.IsValid()) { 45 if (sync_pref.IsValid()) {
46 // The server has a value for the preference, we have to reconcile it with 46 // The server has a value for the preference, we have to reconcile it with
47 // ours. 47 // ours.
48 const sync_pb::PreferenceSpecifics& preference = 48 const sync_pb::PreferenceSpecifics& preference =
(...skipping 18 matching lines...) Expand all
67 } else if (!new_value->IsType(pref->GetType())) { 67 } else if (!new_value->IsType(pref->GetType())) {
68 LOG(WARNING) << "Synced value for " << preference.name() 68 LOG(WARNING) << "Synced value for " << preference.name()
69 << " is of type " << new_value->GetType() 69 << " is of type " << new_value->GetType()
70 << " which doesn't match pref type " << pref->GetType(); 70 << " which doesn't match pref type " << pref->GetType();
71 } else if (!pref->GetValue()->Equals(new_value.get())) { 71 } else if (!pref->GetValue()->Equals(new_value.get())) {
72 pref_service_->Set(pref_name.c_str(), *new_value); 72 pref_service_->Set(pref_name.c_str(), *new_value);
73 } 73 }
74 74
75 // If the merge resulted in an updated value, inform the syncer. 75 // If the merge resulted in an updated value, inform the syncer.
76 if (!value->Equals(new_value.get())) { 76 if (!value->Equals(new_value.get())) {
77 csync::SyncData sync_data; 77 syncer::SyncData sync_data;
78 if (!CreatePrefSyncData(pref->name(), *new_value, &sync_data)) { 78 if (!CreatePrefSyncData(pref->name(), *new_value, &sync_data)) {
79 LOG(ERROR) << "Failed to update preference."; 79 LOG(ERROR) << "Failed to update preference.";
80 return; 80 return;
81 } 81 }
82 sync_changes->push_back( 82 sync_changes->push_back(
83 csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data)); 83 syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
84 } 84 }
85 } else if (pref->IsUserControlled()) { 85 } else if (pref->IsUserControlled()) {
86 // The server does not know about this preference and should be added 86 // The server does not know about this preference and should be added
87 // to the syncer's database. 87 // to the syncer's database.
88 csync::SyncData sync_data; 88 syncer::SyncData sync_data;
89 if (!CreatePrefSyncData(pref->name(), *pref->GetValue(), &sync_data)) { 89 if (!CreatePrefSyncData(pref->name(), *pref->GetValue(), &sync_data)) {
90 LOG(ERROR) << "Failed to update preference."; 90 LOG(ERROR) << "Failed to update preference.";
91 return; 91 return;
92 } 92 }
93 sync_changes->push_back( 93 sync_changes->push_back(
94 csync::SyncChange(csync::SyncChange::ACTION_ADD, sync_data)); 94 syncer::SyncChange(syncer::SyncChange::ACTION_ADD, sync_data));
95 } else { 95 } else {
96 // This pref does not have a sync value but also does not have a user 96 // This pref does not have a sync value but also does not have a user
97 // controlled value (either it's a default value or it's policy controlled, 97 // controlled value (either it's a default value or it's policy controlled,
98 // either way it's not interesting). We can ignore it. Once it gets changed, 98 // either way it's not interesting). We can ignore it. Once it gets changed,
99 // we'll send the new user controlled value to the syncer. 99 // we'll send the new user controlled value to the syncer.
100 return; 100 return;
101 } 101 }
102 102
103 // Make sure we add it to our list of synced preferences so we know what 103 // Make sure we add it to our list of synced preferences so we know what
104 // the server is aware of. 104 // the server is aware of.
105 synced_preferences_.insert(pref_name); 105 synced_preferences_.insert(pref_name);
106 return; 106 return;
107 } 107 }
108 108
109 csync::SyncError PrefModelAssociator::MergeDataAndStartSyncing( 109 syncer::SyncError PrefModelAssociator::MergeDataAndStartSyncing(
110 syncable::ModelType type, 110 syncable::ModelType type,
111 const csync::SyncDataList& initial_sync_data, 111 const syncer::SyncDataList& initial_sync_data,
112 scoped_ptr<csync::SyncChangeProcessor> sync_processor, 112 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
113 scoped_ptr<csync::SyncErrorFactory> sync_error_factory) { 113 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
114 DCHECK_EQ(type, PREFERENCES); 114 DCHECK_EQ(type, PREFERENCES);
115 DCHECK(CalledOnValidThread()); 115 DCHECK(CalledOnValidThread());
116 DCHECK(pref_service_); 116 DCHECK(pref_service_);
117 DCHECK(!sync_processor_.get()); 117 DCHECK(!sync_processor_.get());
118 DCHECK(sync_processor.get()); 118 DCHECK(sync_processor.get());
119 DCHECK(sync_error_factory.get()); 119 DCHECK(sync_error_factory.get());
120 sync_processor_ = sync_processor.Pass(); 120 sync_processor_ = sync_processor.Pass();
121 sync_error_factory_ = sync_error_factory.Pass(); 121 sync_error_factory_ = sync_error_factory.Pass();
122 122
123 csync::SyncChangeList new_changes; 123 syncer::SyncChangeList new_changes;
124 std::set<std::string> remaining_preferences = registered_preferences_; 124 std::set<std::string> remaining_preferences = registered_preferences_;
125 125
126 // Go through and check for all preferences we care about that sync already 126 // Go through and check for all preferences we care about that sync already
127 // knows about. 127 // knows about.
128 for (csync::SyncDataList::const_iterator sync_iter = 128 for (syncer::SyncDataList::const_iterator sync_iter =
129 initial_sync_data.begin(); 129 initial_sync_data.begin();
130 sync_iter != initial_sync_data.end(); 130 sync_iter != initial_sync_data.end();
131 ++sync_iter) { 131 ++sync_iter) {
132 DCHECK_EQ(PREFERENCES, sync_iter->GetDataType()); 132 DCHECK_EQ(PREFERENCES, sync_iter->GetDataType());
133 std::string sync_pref_name = sync_iter->GetSpecifics().preference().name(); 133 std::string sync_pref_name = sync_iter->GetSpecifics().preference().name();
134 if (remaining_preferences.count(sync_pref_name) == 0) { 134 if (remaining_preferences.count(sync_pref_name) == 0) {
135 // We're not syncing this preference locally, ignore the sync data. 135 // We're not syncing this preference locally, ignore the sync data.
136 // TODO(zea): Eventually we want to be able to have the syncable service 136 // TODO(zea): Eventually we want to be able to have the syncable service
137 // reconstruct all sync data for it's datatype (therefore having 137 // reconstruct all sync data for it's datatype (therefore having
138 // GetAllSyncData be a complete representation). We should store this data 138 // GetAllSyncData be a complete representation). We should store this data
139 // somewhere, even if we don't use it. 139 // somewhere, even if we don't use it.
140 continue; 140 continue;
141 } 141 }
142 142
143 remaining_preferences.erase(sync_pref_name); 143 remaining_preferences.erase(sync_pref_name);
144 InitPrefAndAssociate(*sync_iter, sync_pref_name, &new_changes); 144 InitPrefAndAssociate(*sync_iter, sync_pref_name, &new_changes);
145 } 145 }
146 146
147 // Go through and build sync data for any remaining preferences. 147 // Go through and build sync data for any remaining preferences.
148 for (std::set<std::string>::iterator pref_name_iter = 148 for (std::set<std::string>::iterator pref_name_iter =
149 remaining_preferences.begin(); 149 remaining_preferences.begin();
150 pref_name_iter != remaining_preferences.end(); 150 pref_name_iter != remaining_preferences.end();
151 ++pref_name_iter) { 151 ++pref_name_iter) {
152 InitPrefAndAssociate(csync::SyncData(), *pref_name_iter, &new_changes); 152 InitPrefAndAssociate(syncer::SyncData(), *pref_name_iter, &new_changes);
153 } 153 }
154 154
155 // Push updates to sync. 155 // Push updates to sync.
156 csync::SyncError error = 156 syncer::SyncError error =
157 sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes); 157 sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
158 if (error.IsSet()) { 158 if (error.IsSet()) {
159 return error; 159 return error;
160 } 160 }
161 161
162 models_associated_ = true; 162 models_associated_ = true;
163 return csync::SyncError(); 163 return syncer::SyncError();
164 } 164 }
165 165
166 void PrefModelAssociator::StopSyncing(syncable::ModelType type) { 166 void PrefModelAssociator::StopSyncing(syncable::ModelType type) {
167 DCHECK_EQ(type, PREFERENCES); 167 DCHECK_EQ(type, PREFERENCES);
168 models_associated_ = false; 168 models_associated_ = false;
169 sync_processor_.reset(); 169 sync_processor_.reset();
170 sync_error_factory_.reset(); 170 sync_error_factory_.reset();
171 } 171 }
172 172
173 Value* PrefModelAssociator::MergePreference( 173 Value* PrefModelAssociator::MergePreference(
(...skipping 12 matching lines...) Expand all
186 return MergeDictionaryValues(*local_pref.GetValue(), server_value); 186 return MergeDictionaryValues(*local_pref.GetValue(), server_value);
187 } 187 }
188 188
189 // If this is not a specially handled preference, server wins. 189 // If this is not a specially handled preference, server wins.
190 return server_value.DeepCopy(); 190 return server_value.DeepCopy();
191 } 191 }
192 192
193 bool PrefModelAssociator::CreatePrefSyncData( 193 bool PrefModelAssociator::CreatePrefSyncData(
194 const std::string& name, 194 const std::string& name,
195 const Value& value, 195 const Value& value,
196 csync::SyncData* sync_data) { 196 syncer::SyncData* sync_data) {
197 std::string serialized; 197 std::string serialized;
198 // TODO(zea): consider JSONWriter::Write since you don't have to check 198 // TODO(zea): consider JSONWriter::Write since you don't have to check
199 // failures to deserialize. 199 // failures to deserialize.
200 JSONStringValueSerializer json(&serialized); 200 JSONStringValueSerializer json(&serialized);
201 if (!json.Serialize(value)) { 201 if (!json.Serialize(value)) {
202 LOG(ERROR) << "Failed to serialize preference value."; 202 LOG(ERROR) << "Failed to serialize preference value.";
203 return false; 203 return false;
204 } 204 }
205 205
206 sync_pb::EntitySpecifics specifics; 206 sync_pb::EntitySpecifics specifics;
207 sync_pb::PreferenceSpecifics* pref_specifics = specifics.mutable_preference(); 207 sync_pb::PreferenceSpecifics* pref_specifics = specifics.mutable_preference();
208 pref_specifics->set_name(name); 208 pref_specifics->set_name(name);
209 pref_specifics->set_value(serialized); 209 pref_specifics->set_value(serialized);
210 *sync_data = csync::SyncData::CreateLocalData(name, name, specifics); 210 *sync_data = syncer::SyncData::CreateLocalData(name, name, specifics);
211 return true; 211 return true;
212 } 212 }
213 213
214 Value* PrefModelAssociator::MergeListValues(const Value& from_value, 214 Value* PrefModelAssociator::MergeListValues(const Value& from_value,
215 const Value& to_value) { 215 const Value& to_value) {
216 if (from_value.GetType() == Value::TYPE_NULL) 216 if (from_value.GetType() == Value::TYPE_NULL)
217 return to_value.DeepCopy(); 217 return to_value.DeepCopy();
218 if (to_value.GetType() == Value::TYPE_NULL) 218 if (to_value.GetType() == Value::TYPE_NULL)
219 return from_value.DeepCopy(); 219 return from_value.DeepCopy();
220 220
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 result->SetWithoutPathExpansion(*key, from_value->DeepCopy()); 266 result->SetWithoutPathExpansion(*key, from_value->DeepCopy());
267 } 267 }
268 } 268 }
269 return result; 269 return result;
270 } 270 }
271 271
272 // Note: This will build a model of all preferences registered as syncable 272 // Note: This will build a model of all preferences registered as syncable
273 // with user controlled data. We do not track any information for preferences 273 // with user controlled data. We do not track any information for preferences
274 // not registered locally as syncable and do not inform the syncer of 274 // not registered locally as syncable and do not inform the syncer of
275 // non-user controlled preferences. 275 // non-user controlled preferences.
276 csync::SyncDataList PrefModelAssociator::GetAllSyncData( 276 syncer::SyncDataList PrefModelAssociator::GetAllSyncData(
277 syncable::ModelType type) 277 syncable::ModelType type)
278 const { 278 const {
279 DCHECK_EQ(PREFERENCES, type); 279 DCHECK_EQ(PREFERENCES, type);
280 csync::SyncDataList current_data; 280 syncer::SyncDataList current_data;
281 for (PreferenceSet::const_iterator iter = synced_preferences_.begin(); 281 for (PreferenceSet::const_iterator iter = synced_preferences_.begin();
282 iter != synced_preferences_.end(); 282 iter != synced_preferences_.end();
283 ++iter) { 283 ++iter) {
284 std::string name = *iter; 284 std::string name = *iter;
285 const PrefService::Preference* pref = 285 const PrefService::Preference* pref =
286 pref_service_->FindPreference(name.c_str()); 286 pref_service_->FindPreference(name.c_str());
287 DCHECK(pref); 287 DCHECK(pref);
288 if (!pref->IsUserControlled() || pref->IsDefaultValue()) 288 if (!pref->IsUserControlled() || pref->IsDefaultValue())
289 continue; // This is not data we care about. 289 continue; // This is not data we care about.
290 // TODO(zea): plumb a way to read the user controlled value. 290 // TODO(zea): plumb a way to read the user controlled value.
291 csync::SyncData sync_data; 291 syncer::SyncData sync_data;
292 if (!CreatePrefSyncData(name, *pref->GetValue(), &sync_data)) 292 if (!CreatePrefSyncData(name, *pref->GetValue(), &sync_data))
293 continue; 293 continue;
294 current_data.push_back(sync_data); 294 current_data.push_back(sync_data);
295 } 295 }
296 return current_data; 296 return current_data;
297 } 297 }
298 298
299 csync::SyncError PrefModelAssociator::ProcessSyncChanges( 299 syncer::SyncError PrefModelAssociator::ProcessSyncChanges(
300 const tracked_objects::Location& from_here, 300 const tracked_objects::Location& from_here,
301 const csync::SyncChangeList& change_list) { 301 const syncer::SyncChangeList& change_list) {
302 if (!models_associated_) { 302 if (!models_associated_) {
303 csync::SyncError error(FROM_HERE, 303 syncer::SyncError error(FROM_HERE,
304 "Models not yet associated.", 304 "Models not yet associated.",
305 PREFERENCES); 305 PREFERENCES);
306 return error; 306 return error;
307 } 307 }
308 AutoReset<bool> processing_changes(&processing_syncer_changes_, true); 308 AutoReset<bool> processing_changes(&processing_syncer_changes_, true);
309 csync::SyncChangeList::const_iterator iter; 309 syncer::SyncChangeList::const_iterator iter;
310 for (iter = change_list.begin(); iter != change_list.end(); ++iter) { 310 for (iter = change_list.begin(); iter != change_list.end(); ++iter) {
311 DCHECK_EQ(PREFERENCES, iter->sync_data().GetDataType()); 311 DCHECK_EQ(PREFERENCES, iter->sync_data().GetDataType());
312 312
313 std::string name; 313 std::string name;
314 sync_pb::PreferenceSpecifics pref_specifics = 314 sync_pb::PreferenceSpecifics pref_specifics =
315 iter->sync_data().GetSpecifics().preference(); 315 iter->sync_data().GetSpecifics().preference();
316 scoped_ptr<Value> value(ReadPreferenceSpecifics(pref_specifics, 316 scoped_ptr<Value> value(ReadPreferenceSpecifics(pref_specifics,
317 &name)); 317 &name));
318 318
319 if (iter->change_type() == csync::SyncChange::ACTION_DELETE) { 319 if (iter->change_type() == syncer::SyncChange::ACTION_DELETE) {
320 // We never delete preferences. 320 // We never delete preferences.
321 NOTREACHED() << "Attempted to process sync delete change for " << name 321 NOTREACHED() << "Attempted to process sync delete change for " << name
322 << ". Skipping."; 322 << ". Skipping.";
323 continue; 323 continue;
324 } 324 }
325 325
326 // Skip values we can't deserialize. 326 // Skip values we can't deserialize.
327 // TODO(zea): consider taking some further action such as erasing the bad 327 // TODO(zea): consider taking some further action such as erasing the bad
328 // data. 328 // data.
329 if (!value.get()) 329 if (!value.get())
(...skipping 10 matching lines...) Expand all
340 const PrefService::Preference* pref = 340 const PrefService::Preference* pref =
341 pref_service_->FindPreference(pref_name); 341 pref_service_->FindPreference(pref_name);
342 DCHECK(pref); 342 DCHECK(pref);
343 343
344 // This will only modify the user controlled value store, which takes 344 // This will only modify the user controlled value store, which takes
345 // priority over the default value but is ignored if the preference is 345 // priority over the default value but is ignored if the preference is
346 // policy controlled. 346 // policy controlled.
347 pref_service_->Set(pref_name, *value); 347 pref_service_->Set(pref_name, *value);
348 348
349 // Keep track of any newly synced preferences. 349 // Keep track of any newly synced preferences.
350 if (iter->change_type() == csync::SyncChange::ACTION_ADD) { 350 if (iter->change_type() == syncer::SyncChange::ACTION_ADD) {
351 synced_preferences_.insert(name); 351 synced_preferences_.insert(name);
352 } 352 }
353 } 353 }
354 return csync::SyncError(); 354 return syncer::SyncError();
355 } 355 }
356 356
357 Value* PrefModelAssociator::ReadPreferenceSpecifics( 357 Value* PrefModelAssociator::ReadPreferenceSpecifics(
358 const sync_pb::PreferenceSpecifics& preference, 358 const sync_pb::PreferenceSpecifics& preference,
359 std::string* name) { 359 std::string* name) {
360 base::JSONReader reader; 360 base::JSONReader reader;
361 scoped_ptr<Value> value(reader.ReadToValue(preference.value())); 361 scoped_ptr<Value> value(reader.ReadToValue(preference.value()));
362 if (!value.get()) { 362 if (!value.get()) {
363 std::string err = "Failed to deserialize preference value: " + 363 std::string err = "Failed to deserialize preference value: " +
364 reader.GetErrorMessage(); 364 reader.GetErrorMessage();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return; 396 return;
397 397
398 const PrefService::Preference* preference = 398 const PrefService::Preference* preference =
399 pref_service_->FindPreference(name.c_str()); 399 pref_service_->FindPreference(name.c_str());
400 if (!preference) 400 if (!preference)
401 return; 401 return;
402 402
403 if (!IsPrefRegistered(name.c_str())) 403 if (!IsPrefRegistered(name.c_str()))
404 return; // We are not syncing this preference. 404 return; // We are not syncing this preference.
405 405
406 csync::SyncChangeList changes; 406 syncer::SyncChangeList changes;
407 407
408 if (!preference->IsUserModifiable()) { 408 if (!preference->IsUserModifiable()) {
409 // If the preference is no longer user modifiable, it must now be controlled 409 // If the preference is no longer user modifiable, it must now be controlled
410 // by policy, whose values we do not sync. Just return. If the preference 410 // by policy, whose values we do not sync. Just return. If the preference
411 // stops being controlled by policy, it will revert back to the user value 411 // stops being controlled by policy, it will revert back to the user value
412 // (which we continue to update with sync changes). 412 // (which we continue to update with sync changes).
413 return; 413 return;
414 } 414 }
415 415
416 AutoReset<bool> processing_changes(&processing_syncer_changes_, true); 416 AutoReset<bool> processing_changes(&processing_syncer_changes_, true);
417 417
418 if (synced_preferences_.count(name) == 0) { 418 if (synced_preferences_.count(name) == 0) {
419 // Not in synced_preferences_ means no synced data. InitPrefAndAssociate(..) 419 // Not in synced_preferences_ means no synced data. InitPrefAndAssociate(..)
420 // will determine if we care about its data (e.g. if it has a default value 420 // will determine if we care about its data (e.g. if it has a default value
421 // and hasn't been changed yet we don't) and take care syncing any new data. 421 // and hasn't been changed yet we don't) and take care syncing any new data.
422 InitPrefAndAssociate(csync::SyncData(), name, &changes); 422 InitPrefAndAssociate(syncer::SyncData(), name, &changes);
423 } else { 423 } else {
424 // We are already syncing this preference, just update it's sync node. 424 // We are already syncing this preference, just update it's sync node.
425 csync::SyncData sync_data; 425 syncer::SyncData sync_data;
426 if (!CreatePrefSyncData(name, *preference->GetValue(), &sync_data)) { 426 if (!CreatePrefSyncData(name, *preference->GetValue(), &sync_data)) {
427 LOG(ERROR) << "Failed to update preference."; 427 LOG(ERROR) << "Failed to update preference.";
428 return; 428 return;
429 } 429 }
430 changes.push_back( 430 changes.push_back(
431 csync::SyncChange(csync::SyncChange::ACTION_UPDATE, sync_data)); 431 syncer::SyncChange(syncer::SyncChange::ACTION_UPDATE, sync_data));
432 } 432 }
433 433
434 csync::SyncError error = 434 syncer::SyncError error =
435 sync_processor_->ProcessSyncChanges(FROM_HERE, changes); 435 sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
436 } 436 }
437 437
438 void PrefModelAssociator::SetPrefService(PrefService* pref_service) { 438 void PrefModelAssociator::SetPrefService(PrefService* pref_service) {
439 DCHECK(pref_service_ == NULL); 439 DCHECK(pref_service_ == NULL);
440 pref_service_ = pref_service; 440 pref_service_ = pref_service;
441 } 441 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_model_associator.h ('k') | chrome/browser/prefs/pref_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698