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

Side by Side Diff: components/prefs/pref_value_store.h

Issue 1825173003: [Policy Experimental] Add "recommended" policies for URL exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 4 years, 8 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 | « components/prefs/pref_service.cc ('k') | components/prefs/pref_value_store.cc » ('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) 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 #ifndef COMPONENTS_PREFS_PREF_VALUE_STORE_H_ 5 #ifndef COMPONENTS_PREFS_PREF_VALUE_STORE_H_
6 #define COMPONENTS_PREFS_PREF_VALUE_STORE_H_ 6 #define COMPONENTS_PREFS_PREF_VALUE_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 // Gets the value for the given preference name that has the specified value 75 // Gets the value for the given preference name that has the specified value
76 // type. Values stored in a PrefStore that have the matching |name| but 76 // type. Values stored in a PrefStore that have the matching |name| but
77 // a non-matching |type| are silently skipped. Returns true if a valid value 77 // a non-matching |type| are silently skipped. Returns true if a valid value
78 // was found in any of the available PrefStores. Most callers should use 78 // was found in any of the available PrefStores. Most callers should use
79 // Preference::GetValue() instead of calling this method directly. 79 // Preference::GetValue() instead of calling this method directly.
80 bool GetValue(const std::string& name, 80 bool GetValue(const std::string& name,
81 base::Value::Type type, 81 base::Value::Type type,
82 const base::Value** out_value) const; 82 const base::Value** out_value) const;
83 83
84 // Gets the managed value for the given preference name that has the
85 // specified value type. A value stored in the managed PrefStore that has
86 // the matching |name| but a non-matching |type| is silently ignored. Returns
87 // true if a valid value was found. Most callers should use
88 // Preference::GetManagedValue() instead of calling this method directly.
89 bool GetManagedValue(const std::string& name,
90 base::Value::Type type,
91 const base::Value** out_value) const;
92
84 // Gets the recommended value for the given preference name that has the 93 // Gets the recommended value for the given preference name that has the
85 // specified value type. A value stored in the recommended PrefStore that has 94 // specified value type. A value stored in the recommended PrefStore that has
86 // the matching |name| but a non-matching |type| is silently ignored. Returns 95 // the matching |name| but a non-matching |type| is silently ignored. Returns
87 // true if a valid value was found. Most callers should use 96 // true if a valid value was found. Most callers should use
88 // Preference::GetRecommendedValue() instead of calling this method directly. 97 // Preference::GetRecommendedValue() instead of calling this method directly.
89 bool GetRecommendedValue(const std::string& name, 98 bool GetRecommendedValue(const std::string& name,
90 base::Value::Type type, 99 base::Value::Type type,
91 const base::Value** out_value) const; 100 const base::Value** out_value) const;
92 101
93 // These methods return true if a preference with the given name is in the 102 // These methods return true if a preference with the given name is in the
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // A mapping of preference names to their registered types. 260 // A mapping of preference names to their registered types.
252 PrefTypeMap pref_types_; 261 PrefTypeMap pref_types_;
253 262
254 // True if not all of the PrefStores were initialized successfully. 263 // True if not all of the PrefStores were initialized successfully.
255 bool initialization_failed_; 264 bool initialization_failed_;
256 265
257 DISALLOW_COPY_AND_ASSIGN(PrefValueStore); 266 DISALLOW_COPY_AND_ASSIGN(PrefValueStore);
258 }; 267 };
259 268
260 #endif // COMPONENTS_PREFS_PREF_VALUE_STORE_H_ 269 #endif // COMPONENTS_PREFS_PREF_VALUE_STORE_H_
OLDNEW
« no previous file with comments | « components/prefs/pref_service.cc ('k') | components/prefs/pref_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698