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

Side by Side Diff: chrome/browser/extensions/extension_prefs_unittest.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 "extension_prefs_unittest.h" 5 #include "extension_prefs_unittest.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/prefs/public/pref_change_registrar.h" 10 #include "base/prefs/public/pref_change_registrar.h"
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 ext3_ = ext3_scoped_.get(); 827 ext3_ = ext3_scoped_.get();
828 ext4_ = ext4_scoped_.get(); 828 ext4_ = ext4_scoped_.get();
829 829
830 for (size_t i = 0; i < arraysize(installed); ++i) 830 for (size_t i = 0; i < arraysize(installed); ++i)
831 installed[i] = false; 831 installed[i] = false;
832 } 832 }
833 833
834 ExtensionPrefsPrepopulatedTest::~ExtensionPrefsPrepopulatedTest() {} 834 ExtensionPrefsPrepopulatedTest::~ExtensionPrefsPrepopulatedTest() {}
835 835
836 void ExtensionPrefsPrepopulatedTest::RegisterPreferences() { 836 void ExtensionPrefsPrepopulatedTest::RegisterPreferences() {
837 prefs()->pref_service()->RegisterStringPref(kPref1, 837 prefs()->pref_service()->RegisterStringPref(
838 kDefaultPref1, 838 kPref1, kDefaultPref1, PrefServiceSyncable::UNSYNCABLE_PREF);
839 PrefService::UNSYNCABLE_PREF); 839 prefs()->pref_service()->RegisterStringPref(
840 prefs()->pref_service()->RegisterStringPref(kPref2, 840 kPref2, kDefaultPref2, PrefServiceSyncable::UNSYNCABLE_PREF);
841 kDefaultPref2, 841 prefs()->pref_service()->RegisterStringPref(
842 PrefService::UNSYNCABLE_PREF); 842 kPref3, kDefaultPref3, PrefServiceSyncable::UNSYNCABLE_PREF);
843 prefs()->pref_service()->RegisterStringPref(kPref3, 843 prefs()->pref_service()->RegisterStringPref(
844 kDefaultPref3, 844 kPref4, kDefaultPref4, PrefServiceSyncable::UNSYNCABLE_PREF);
845 PrefService::UNSYNCABLE_PREF);
846 prefs()->pref_service()->RegisterStringPref(kPref4,
847 kDefaultPref4,
848 PrefService::UNSYNCABLE_PREF);
849 } 845 }
850 846
851 void ExtensionPrefsPrepopulatedTest::InstallExtControlledPref( 847 void ExtensionPrefsPrepopulatedTest::InstallExtControlledPref(
852 Extension *ext, 848 Extension *ext,
853 const std::string& key, 849 const std::string& key,
854 Value* val) { 850 Value* val) {
855 EnsureExtensionInstalled(ext); 851 EnsureExtensionInstalled(ext);
856 prefs()->SetExtensionControlledPref( 852 prefs()->SetExtensionControlledPref(
857 ext->id(), key, kExtensionPrefsScopeRegular, val); 853 ext->id(), key, kExtensionPrefsScopeRegular, val);
858 } 854 }
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 1258
1263 private: 1259 private:
1264 scoped_refptr<const Extension> extension_a_; 1260 scoped_refptr<const Extension> extension_a_;
1265 scoped_refptr<const Extension> extension_b_; 1261 scoped_refptr<const Extension> extension_b_;
1266 scoped_refptr<const Extension> extension_c_; 1262 scoped_refptr<const Extension> extension_c_;
1267 }; 1263 };
1268 TEST_F(ExtensionPrefsBlacklistedExtensions, 1264 TEST_F(ExtensionPrefsBlacklistedExtensions,
1269 ExtensionPrefsBlacklistedExtensions) {} 1265 ExtensionPrefsBlacklistedExtensions) {}
1270 1266
1271 } // namespace extensions 1267 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698