summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:30:45 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:30:45 +0000
commit0e5eeb0f24d0874a2ff2e8f491d0d7fbd1921527 (patch)
tree978d480c23177647a7e706b531c097fc0cebed4b /chrome
parent58ae9fad00daf5ba114daab78528618d467422e8 (diff)
downloadchromium_src-0e5eeb0f24d0874a2ff2e8f491d0d7fbd1921527.zip
chromium_src-0e5eeb0f24d0874a2ff2e8f491d0d7fbd1921527.tar.gz
chromium_src-0e5eeb0f24d0874a2ff2e8f491d0d7fbd1921527.tar.bz2
Reorder some functions in ExtensionPrefs to keep related methods together.
Looks like the GetGrantedPermissions/AddGrantedPermissions methods were accidentally put in the middle of some of the *PingDay group of methods. BUG=none TEST=none TBR=jstritar Review URL: http://codereview.chromium.org/6627023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-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);