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

Unified Diff: components/prefs/pref_service.h

Issue 2276043004: Add PrefMember<base::Time> Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add PrefService::{Get,Set}Time(..., base::Time) Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/prefs/pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/pref_service.h
diff --git a/components/prefs/pref_service.h b/components/prefs/pref_service.h
index 82de7c4b79ed8852860421d95a94d3d6125999ff..7eba374aaba7e83cf33cd09653171d4dc939d9ac 100644
--- a/components/prefs/pref_service.h
+++ b/components/prefs/pref_service.h
@@ -24,6 +24,7 @@
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/threading/non_thread_safe.h"
+#include "base/time/time.h"
#include "base/values.h"
#include "components/prefs/base_prefs_export.h"
#include "components/prefs/persistent_pref_store.h"
@@ -198,6 +199,7 @@ class COMPONENTS_PREFS_EXPORT PrefService : public base::NonThreadSafe {
double GetDouble(const std::string& path) const;
std::string GetString(const std::string& path) const;
base::FilePath GetFilePath(const std::string& path) const;
+ base::Time GetTime(const std::string& path) const;
// Returns the branch if it exists, or the registered default value otherwise.
// Note that |path| must point to a registered preference. In that case, these
@@ -219,6 +221,7 @@ class COMPONENTS_PREFS_EXPORT PrefService : public base::NonThreadSafe {
void SetDouble(const std::string& path, double value);
void SetString(const std::string& path, const std::string& value);
void SetFilePath(const std::string& path, const base::FilePath& value);
+ void SetTime(const std::string& path, base::Time time);
// Int64 helper methods that actually store the given value as a string.
// Note that if obtaining the named value via GetDictionary or GetList, the
« no previous file with comments | « no previous file | components/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698