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

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

Issue 5213002: Fix for Bug 50726 "Save extension list and "winning" prefs from extensions" (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Same patch but without stuff that is already included in 5204006 Created 10 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
« no previous file with comments | « chrome/browser/prefs/pref_service.h ('k') | chrome/browser/prefs/pref_value_store.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include <string> 8 #include <string>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 NOTREACHED() << "Trying to set pref " << path 572 NOTREACHED() << "Trying to set pref " << path
573 << " of type " << pref->GetType() 573 << " of type " << pref->GetType()
574 << " to value of type " << new_value->GetType(); 574 << " to value of type " << new_value->GetType();
575 return; 575 return;
576 } 576 }
577 577
578 if (pref_value_store_->SetUserPrefValue(path, new_value)) 578 if (pref_value_store_->SetUserPrefValue(path, new_value))
579 pref_notifier_->OnUserPreferenceSet(path); 579 pref_notifier_->OnUserPreferenceSet(path);
580 } 580 }
581 581
582 PrefStore* PrefService::GetExtensionPrefStore() const {
583 return pref_value_store()->GetExtensionPrefStore();
584 }
585
582 /////////////////////////////////////////////////////////////////////////////// 586 ///////////////////////////////////////////////////////////////////////////////
583 // PrefService::Preference 587 // PrefService::Preference
584 588
585 PrefService::Preference::Preference(const PrefService* service, 589 PrefService::Preference::Preference(const PrefService* service,
586 const char* name) 590 const char* name)
587 : name_(name), 591 : name_(name),
588 pref_service_(service) { 592 pref_service_(service) {
589 DCHECK(name); 593 DCHECK(name);
590 DCHECK(service); 594 DCHECK(service);
591 } 595 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 640
637 bool PrefService::Preference::IsDefaultValue() const { 641 bool PrefService::Preference::IsDefaultValue() const {
638 return pref_service_->pref_value_store_-> 642 return pref_service_->pref_value_store_->
639 PrefValueFromDefaultStore(name_.c_str()); 643 PrefValueFromDefaultStore(name_.c_str());
640 } 644 }
641 645
642 bool PrefService::Preference::IsUserModifiable() const { 646 bool PrefService::Preference::IsUserModifiable() const {
643 return pref_service_->pref_value_store_-> 647 return pref_service_->pref_value_store_->
644 PrefValueUserModifiable(name_.c_str()); 648 PrefValueUserModifiable(name_.c_str());
645 } 649 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_service.h ('k') | chrome/browser/prefs/pref_value_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698