diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 21:17:39 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 21:17:39 +0000 |
commit | dffeb89734143d57a09c96ae473552463fd579bb (patch) | |
tree | 8986f934595990980cc000dd72a337459c2cd19f /chrome/browser/extensions/extension_bookmarks_module.h | |
parent | 5e96b65b0470d18a169f4d9eacc8784d1fcfeb6d (diff) | |
download | chromium_src-dffeb89734143d57a09c96ae473552463fd579bb.zip chromium_src-dffeb89734143d57a09c96ae473552463fd579bb.tar.gz chromium_src-dffeb89734143d57a09c96ae473552463fd579bb.tar.bz2 |
Always persist bookmark IDs.
Remove the preference to persist IDs.
NOTE that we need to save the file the first time with IDs
since existing bookmark files won't have IDs and the file
won't be saved until something changes in the bookmark model.
So we need to explicitly save once when we assign ids for the
first time.
TEST=NONE
BUG=16068
Review URL: http://codereview.chromium.org/149310
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_bookmarks_module.h')
-rw-r--r-- | chrome/browser/extensions/extension_bookmarks_module.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_bookmarks_module.h b/chrome/browser/extensions/extension_bookmarks_module.h index cfa32de..7cfc1ca2 100644 --- a/chrome/browser/extensions/extension_bookmarks_module.h +++ b/chrome/browser/extensions/extension_bookmarks_module.h @@ -70,6 +70,12 @@ class BookmarksFunction : public AsyncExtensionFunction, virtual void Run(); virtual bool RunImpl() = 0; + protected: + // Helper to get the bookmark id as int64 from the given string id. + // Sets error_ to an errro string if the given id string can't be parsed + // as an int64. In case of error, doesn't change id and returns false. + bool GetBookmarkIdAsInt64(const std::string& id_string, int64* id); + private: virtual void Observe(NotificationType type, const NotificationSource& source, |