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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years 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) 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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/prefs/pref_service.h"
14 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
15 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
16 #include "sync/api/sync_change.h" 17 #include "sync/api/sync_change.h"
17 #include "sync/api/sync_error_factory.h" 18 #include "sync/api/sync_error_factory.h"
18 #include "sync/protocol/preference_specifics.pb.h" 19 #include "sync/protocol/preference_specifics.pb.h"
19 #include "sync/protocol/sync.pb.h" 20 #include "sync/protocol/sync.pb.h"
20 21
21 using syncer::PREFERENCES; 22 using syncer::PREFERENCES;
22 23
23 PrefModelAssociator::PrefModelAssociator() 24 PrefModelAssociator::PrefModelAssociator()
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 changes.push_back( 446 changes.push_back(
446 syncer::SyncChange(FROM_HERE, 447 syncer::SyncChange(FROM_HERE,
447 syncer::SyncChange::ACTION_UPDATE, 448 syncer::SyncChange::ACTION_UPDATE,
448 sync_data)); 449 sync_data));
449 } 450 }
450 451
451 syncer::SyncError error = 452 syncer::SyncError error =
452 sync_processor_->ProcessSyncChanges(FROM_HERE, changes); 453 sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
453 } 454 }
454 455
455 void PrefModelAssociator::SetPrefService(PrefService* pref_service) { 456 void PrefModelAssociator::SetPrefService(PrefServiceSyncable* pref_service) {
456 DCHECK(pref_service_ == NULL); 457 DCHECK(pref_service_ == NULL);
457 pref_service_ = pref_service; 458 pref_service_ = pref_service;
458 } 459 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698