summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_prefs.cc40
-rw-r--r--chrome/browser/extensions/extension_prefs.h10
2 files changed, 25 insertions, 25 deletions
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 1aa8840..506145c 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -488,6 +488,26 @@ void ExtensionPrefs::SetLastPingDayImpl(const Time& time,
SavePrefsAndNotify();
}
+Time ExtensionPrefs::LastPingDay(const std::string& extension_id) const {
+ DCHECK(Extension::IdIsValid(extension_id));
+ return LastPingDayImpl(GetExtensionPref(extension_id));
+}
+
+Time ExtensionPrefs::BlacklistLastPingDay() const {
+ return LastPingDayImpl(prefs_->GetDictionary(kExtensionsBlacklistUpdate));
+}
+
+void ExtensionPrefs::SetLastPingDay(const std::string& extension_id,
+ const Time& time) {
+ DCHECK(Extension::IdIsValid(extension_id));
+ SetLastPingDayImpl(time, GetExtensionPref(extension_id));
+}
+
+void ExtensionPrefs::SetBlacklistLastPingDay(const Time& time) {
+ SetLastPingDayImpl(time,
+ prefs_->GetMutableDictionary(kExtensionsBlacklistUpdate));
+}
+
bool ExtensionPrefs::GetGrantedPermissions(
const std::string& extension_id,
bool* full_access,
@@ -554,26 +574,6 @@ void ExtensionPrefs::AddGrantedPermissions(
SavePrefsAndNotify();
}
-Time ExtensionPrefs::LastPingDay(const std::string& extension_id) const {
- DCHECK(Extension::IdIsValid(extension_id));
- return LastPingDayImpl(GetExtensionPref(extension_id));
-}
-
-Time ExtensionPrefs::BlacklistLastPingDay() const {
- return LastPingDayImpl(prefs_->GetDictionary(kExtensionsBlacklistUpdate));
-}
-
-void ExtensionPrefs::SetLastPingDay(const std::string& extension_id,
- const Time& time) {
- DCHECK(Extension::IdIsValid(extension_id));
- SetLastPingDayImpl(time, GetExtensionPref(extension_id));
-}
-
-void ExtensionPrefs::SetBlacklistLastPingDay(const Time& time) {
- SetLastPingDayImpl(time,
- prefs_->GetMutableDictionary(kExtensionsBlacklistUpdate));
-}
-
bool ExtensionPrefs::IsIncognitoEnabled(const std::string& extension_id) {
return ReadExtensionPrefBoolean(extension_id, kPrefIncognitoEnabled);
}
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
index d672ce3..09fa457 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -155,11 +155,15 @@ class ExtensionPrefs {
// the client's.
void SetLastPingDay(const std::string& extension_id, const base::Time& time);
+ // Similar to the 2 above, but for the extensions blacklist.
+ base::Time BlacklistLastPingDay() const;
+ void SetBlacklistLastPingDay(const base::Time& time);
+
// Gets the permissions (|api_permissions|, |host_extent| and |full_access|)
// granted to the extension with |extension_id|. |full_access| will be true
// if the extension has all effective permissions (like from an NPAPI plugin).
// Returns false if the granted permissions haven't been initialized yet.
- // TODO(jstritar): Refractor the permissions into a class that encapsulates
+ // TODO(jstritar): Refactor the permissions into a class that encapsulates
// all granted permissions, can be initialized from preferences or
// a manifest file, and can be compared to each other.
bool GetGrantedPermissions(const std::string& extension_id,
@@ -176,10 +180,6 @@ class ExtensionPrefs {
const std::set<std::string>& api_permissions,
const ExtensionExtent& host_extent);
- // Similar to the 2 above, but for the extensions blacklist.
- base::Time BlacklistLastPingDay() const;
- void SetBlacklistLastPingDay(const base::Time& time);
-
// Returns true if the user enabled this extension to be loaded in incognito
// mode.
bool IsIncognitoEnabled(const std::string& extension_id);