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

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

Issue 10662035: [Sync] Put everything in sync/api into csync namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix 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
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_service.h" 5 #include "chrome/browser/prefs/pref_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 if (pref->GetType() != new_value->GetType()) { 913 if (pref->GetType() != new_value->GetType()) {
914 NOTREACHED() << "Trying to set pref " << path 914 NOTREACHED() << "Trying to set pref " << path
915 << " of type " << pref->GetType() 915 << " of type " << pref->GetType()
916 << " to value of type " << new_value->GetType(); 916 << " to value of type " << new_value->GetType();
917 return; 917 return;
918 } 918 }
919 919
920 user_pref_store_->SetValue(path, owned_value.release()); 920 user_pref_store_->SetValue(path, owned_value.release());
921 } 921 }
922 922
923 SyncableService* PrefService::GetSyncableService() { 923 csync::SyncableService* PrefService::GetSyncableService() {
924 return pref_sync_associator_.get(); 924 return pref_sync_associator_.get();
925 } 925 }
926 926
927 void PrefService::UpdateCommandLinePrefStore(CommandLine* command_line) { 927 void PrefService::UpdateCommandLinePrefStore(CommandLine* command_line) {
928 // If |pref_service_forked_| is true, then this PrefService and the forked 928 // If |pref_service_forked_| is true, then this PrefService and the forked
929 // copies will be out of sync. 929 // copies will be out of sync.
930 DCHECK(!pref_service_forked_); 930 DCHECK(!pref_service_forked_);
931 pref_value_store_->UpdateCommandLinePrefStore( 931 pref_value_store_->UpdateCommandLinePrefStore(
932 new CommandLinePrefStore(command_line)); 932 new CommandLinePrefStore(command_line));
933 } 933 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 return pref_value_store()->PrefValueFromDefaultStore(name_.c_str()); 992 return pref_value_store()->PrefValueFromDefaultStore(name_.c_str());
993 } 993 }
994 994
995 bool PrefService::Preference::IsUserModifiable() const { 995 bool PrefService::Preference::IsUserModifiable() const {
996 return pref_value_store()->PrefValueUserModifiable(name_.c_str()); 996 return pref_value_store()->PrefValueUserModifiable(name_.c_str());
997 } 997 }
998 998
999 bool PrefService::Preference::IsExtensionModifiable() const { 999 bool PrefService::Preference::IsExtensionModifiable() const {
1000 return pref_value_store()->PrefValueExtensionModifiable(name_.c_str()); 1000 return pref_value_store()->PrefValueExtensionModifiable(name_.c_str());
1001 } 1001 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_service.h ('k') | chrome/browser/search_engines/template_url_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698