summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_bookmarks_module.cc
diff options
context:
space:
mode:
authorfeldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 00:04:56 +0000
committerfeldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 00:04:56 +0000
commitcb6cf79cacd881bcbc4f00bb449d7044619aeced (patch)
tree1b265453e2ad2a33beda3d6630444e76da3321a0 /chrome/browser/extensions/extension_bookmarks_module.cc
parent69b3f1eab57725dd68502c19f4eed1fa9c7f401f (diff)
downloadchromium_src-cb6cf79cacd881bcbc4f00bb449d7044619aeced.zip
chromium_src-cb6cf79cacd881bcbc4f00bb449d7044619aeced.tar.gz
chromium_src-cb6cf79cacd881bcbc4f00bb449d7044619aeced.tar.bz2
Add import/export extension apis
This is a duplicate of 543094. That code review seems to have gotten corrupted as i can no longer publish anything from their web UI. It was LGTM'd+nits by arv, which i've fixed here. BUG=32194 TEST=Import and export bookmarks from the extension Review URL: http://codereview.chromium.org/548167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_bookmarks_module.cc')
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
index 568391c..33abc39 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -279,6 +279,25 @@ void ExtensionBookmarkEventRouter::BookmarkNodeChildrenReordered(
json_args);
}
+void ExtensionBookmarkEventRouter::
+ BookmarkImportBeginning(BookmarkModel* model) {
+ ListValue args;
+ std::string json_args;
+ base::JSONWriter::Write(&args, false, &json_args);
+ DispatchEvent(model->profile(),
+ keys::kOnBookmarkImportBegan,
+ json_args);
+}
+
+void ExtensionBookmarkEventRouter::BookmarkImportEnding(BookmarkModel* model) {
+ ListValue args;
+ std::string json_args;
+ base::JSONWriter::Write(&args, false, &json_args);
+ DispatchEvent(model->profile(),
+ keys::kOnBookmarkImportEnded,
+ json_args);
+}
+
bool GetBookmarksFunction::RunImpl() {
BookmarkModel* model = profile()->GetBookmarkModel();
scoped_ptr<ListValue> json(new ListValue());