OLD | NEW |
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/prefs/pref_notifier.h" | 9 #include "base/prefs/pref_notifier.h" |
10 #include "base/prefs/testing_pref_store.h" | 10 #include "base/prefs/testing_pref_store.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 sync_associator_.reset(new MockPrefModelAssociator()); | 99 sync_associator_.reset(new MockPrefModelAssociator()); |
100 | 100 |
101 // Create a fresh PrefValueStore. | 101 // Create a fresh PrefValueStore. |
102 pref_value_store_.reset(new PrefValueStore( | 102 pref_value_store_.reset(new PrefValueStore( |
103 managed_pref_store_, | 103 managed_pref_store_, |
104 extension_pref_store_, | 104 extension_pref_store_, |
105 command_line_pref_store_, | 105 command_line_pref_store_, |
106 user_pref_store_, | 106 user_pref_store_, |
107 recommended_pref_store_, | 107 recommended_pref_store_, |
108 default_pref_store_, | 108 default_pref_store_, |
109 sync_associator_.get(), | |
110 &pref_notifier_)); | 109 &pref_notifier_)); |
| 110 |
| 111 pref_value_store_->set_sync_associator(sync_associator_.get()); |
111 } | 112 } |
112 | 113 |
113 void CreateManagedPrefs() { | 114 void CreateManagedPrefs() { |
114 managed_pref_store_ = new TestingPrefStore; | 115 managed_pref_store_ = new TestingPrefStore; |
115 managed_pref_store_->SetString( | 116 managed_pref_store_->SetString( |
116 prefs::kManagedPref, | 117 prefs::kManagedPref, |
117 managed_pref::kManagedValue); | 118 managed_pref::kManagedValue); |
118 } | 119 } |
119 | 120 |
120 void CreateExtensionPrefs() { | 121 void CreateExtensionPrefs() { |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 prefs::kCommandLinePref)); | 583 prefs::kCommandLinePref)); |
583 EXPECT_TRUE(pref_value_store_->PrefValueExtensionModifiable( | 584 EXPECT_TRUE(pref_value_store_->PrefValueExtensionModifiable( |
584 prefs::kUserPref)); | 585 prefs::kUserPref)); |
585 EXPECT_TRUE(pref_value_store_->PrefValueExtensionModifiable( | 586 EXPECT_TRUE(pref_value_store_->PrefValueExtensionModifiable( |
586 prefs::kRecommendedPref)); | 587 prefs::kRecommendedPref)); |
587 EXPECT_TRUE(pref_value_store_->PrefValueExtensionModifiable( | 588 EXPECT_TRUE(pref_value_store_->PrefValueExtensionModifiable( |
588 prefs::kDefaultPref)); | 589 prefs::kDefaultPref)); |
589 EXPECT_TRUE(pref_value_store_->PrefValueExtensionModifiable( | 590 EXPECT_TRUE(pref_value_store_->PrefValueExtensionModifiable( |
590 prefs::kMissingPref)); | 591 prefs::kMissingPref)); |
591 } | 592 } |
OLD | NEW |