summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_module.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_module.cc')
-rw-r--r--chrome/browser/extensions/extension_module.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_module.cc b/chrome/browser/extensions/extension_module.cc
new file mode 100644
index 0000000..84c3789
--- /dev/null
+++ b/chrome/browser/extensions/extension_module.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/extension_module.h"
+
+#include <string>
+
+#include "chrome/browser/extensions/extension_prefs.h"
+#include "chrome/browser/extensions/extensions_service.h"
+#include "chrome/browser/profile.h"
+
+ExtensionPrefs* SetUpdateUrlDataFunction::extension_prefs() {
+ return profile()->GetExtensionsService()->extension_prefs();
+}
+
+bool SetUpdateUrlDataFunction::RunImpl() {
+ std::string data;
+ EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data));
+
+ extension_prefs()->SetUpdateUrlData(extension_id(), data);
+ return true;
+}