summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_prefs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_prefs.cc')
-rw-r--r--chrome/browser/extensions/extension_prefs.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index bf80550..3c789b0 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -75,6 +75,9 @@ const char kPrefLaunchType[] = "launchType";
// A preference determining the order of which the apps appear on the NTP.
const char kPrefAppLaunchIndex[] = "app_launcher_index";
+// "A preference for storing extra data sent in update checks for an extension.
+const char kUpdateUrlData[] = "update_url_data";
+
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -895,6 +898,28 @@ int ExtensionPrefs::GetNextAppLaunchIndex() {
return max_value + 1;
}
+void ExtensionPrefs::SetUpdateUrlData(const std::string& extension_id,
+ const std::string& data) {
+ DictionaryValue* dictionary = GetExtensionPref(extension_id);
+ if (!dictionary) {
+ NOTREACHED();
+ return;
+ }
+
+ dictionary->SetString(kUpdateUrlData, data);
+ SavePrefsAndNotify();
+}
+
+std::string ExtensionPrefs::GetUpdateUrlData(const std::string& extension_id) {
+ DictionaryValue* dictionary = GetExtensionPref(extension_id);
+ if (!dictionary)
+ return std::string();
+
+ std::string data;
+ dictionary->GetString(kUpdateUrlData, &data);
+ return data;
+}
+
// static
void ExtensionPrefs::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterDictionaryPref(kExtensionsPref);