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

Side by Side Diff: chrome/test/testing_pref_service.h

Issue 2878075: Introduce a resource identifier for content settings. (Closed)
Patch Set: updates Created 10 years, 4 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | no next file » | 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 #ifndef CHROME_TEST_TESTING_PREF_SERVICE_H_ 5 #ifndef CHROME_TEST_TESTING_PREF_SERVICE_H_
6 #define CHROME_TEST_TESTING_PREF_SERVICE_H_ 6 #define CHROME_TEST_TESTING_PREF_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <chrome/browser/pref_service.h> 9 #include "chrome/browser/pref_service.h"
10 10
11 // A PrefService subclass for testing. It operates totally in memory and 11 // A PrefService subclass for testing. It operates totally in memory and
12 // provides additional API for manipulating preferences at the different levels 12 // provides additional API for manipulating preferences at the different levels
13 // (managed, extension, user) conveniently. 13 // (managed, extension, user) conveniently.
14 class TestingPrefService : public PrefService { 14 class TestingPrefService : public PrefService {
15 public: 15 public:
16 // Create an empty instance. 16 // Create an empty instance.
17 TestingPrefService(); 17 TestingPrefService();
18 18
19 // Read the value of a preference from the managed layer. Returns NULL if the 19 // Read the value of a preference from the managed layer. Returns NULL if the
(...skipping 20 matching lines...) Expand all
40 40
41 // Sets the value for |path| in |pref_store|. 41 // Sets the value for |path| in |pref_store|.
42 void SetPref(PrefStore* pref_store, const wchar_t* path, Value* value); 42 void SetPref(PrefStore* pref_store, const wchar_t* path, Value* value);
43 43
44 // Removes the preference identified by |path| from |pref_store|. 44 // Removes the preference identified by |path| from |pref_store|.
45 void RemovePref(PrefStore* pref_store, const wchar_t* path); 45 void RemovePref(PrefStore* pref_store, const wchar_t* path);
46 46
47 // Pointers to the pref stores our value store uses. 47 // Pointers to the pref stores our value store uses.
48 PrefStore* managed_prefs_; 48 PrefStore* managed_prefs_;
49 PrefStore* user_prefs_; 49 PrefStore* user_prefs_;
50
51 DISALLOW_COPY_AND_ASSIGN(TestingPrefService);
50 }; 52 };
51 53
52 #endif // CHROME_TEST_TESTING_PREF_SERVICE_H_ 54 #endif // CHROME_TEST_TESTING_PREF_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698