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

Unified Diff: chrome/service/service_process_prefs.h

Issue 10958052: Removed unnecessary returning by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/service/service_process_prefs.h
diff --git a/chrome/service/service_process_prefs.h b/chrome/service/service_process_prefs.h
index 74a674d9a5cb51d54d785755f93711d87d92bcf1..ed9928e38a97c092506150dbb0d838b9255d3a88 100644
--- a/chrome/service/service_process_prefs.h
+++ b/chrome/service/service_process_prefs.h
@@ -11,6 +11,7 @@
namespace base {
class DictionaryValue;
+class ListValue;
}
// Manages persistent preferences for the service process. This is basically a
@@ -29,21 +30,24 @@ class ServiceProcessPrefs {
// Write the data to the backing file.
void WritePrefs();
- // Get a string preference for |key| and store it in |result|.
- void GetString(const std::string& key, std::string* result) const;
+ // Returns a string preference for |key|.
+ std::string GetString(const std::string& key,
+ const std::string& default) const;
// Set a string |value| for |key|.
void SetString(const std::string& key, const std::string& value);
- // Get a boolean preference for |key| and store it in |result|.
- void GetBoolean(const std::string& key, bool* result) const;
+ // Returns a boolean preference for |key|.
+ bool GetBoolean(const std::string& key, bool default) const;
// Set a boolean |value| for |key|.
void SetBoolean(const std::string& key, bool value);
- // Get a dictionary preference for |key| and store it in |result|.
- void GetDictionary(const std::string& key,
- const base::DictionaryValue** result) const;
+ // Returns a dictionary preference for |key|.
+ const base::DictionaryValue* GetDictionary(const std::string& key) const;
+
+ // Returns a list for |key|.
+ const base::ListValue* GetList(const std::string& key) const;
// Removes the pref specified by |key|.
void RemovePref(const std::string& key);

Powered by Google App Engine
This is Rietveld 408576698