Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: chrome/browser/extensions/extension_bookmarks_module.h

Issue 155456: Try the original CL "Always persist bookmark IDs" again with the fix to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 std::set<BookmarkModel*> models_; 63 std::set<BookmarkModel*> models_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(ExtensionBookmarkEventRouter); 65 DISALLOW_COPY_AND_ASSIGN(ExtensionBookmarkEventRouter);
66 }; 66 };
67 67
68 class BookmarksFunction : public AsyncExtensionFunction, 68 class BookmarksFunction : public AsyncExtensionFunction,
69 public NotificationObserver { 69 public NotificationObserver {
70 virtual void Run(); 70 virtual void Run();
71 virtual bool RunImpl() = 0; 71 virtual bool RunImpl() = 0;
72 72
73 protected:
74 // Helper to get the bookmark id as int64 from the given string id.
75 // Sets error_ to an errro string if the given id string can't be parsed
76 // as an int64. In case of error, doesn't change id and returns false.
77 bool GetBookmarkIdAsInt64(const std::string& id_string, int64* id);
78
73 private: 79 private:
74 virtual void Observe(NotificationType type, 80 virtual void Observe(NotificationType type,
75 const NotificationSource& source, 81 const NotificationSource& source,
76 const NotificationDetails& details); 82 const NotificationDetails& details);
77 NotificationRegistrar registrar_; 83 NotificationRegistrar registrar_;
78 }; 84 };
79 85
80 class GetBookmarksFunction : public BookmarksFunction { 86 class GetBookmarksFunction : public BookmarksFunction {
81 virtual bool RunImpl(); 87 virtual bool RunImpl();
82 }; 88 };
(...skipping 20 matching lines...) Expand all
103 109
104 class MoveBookmarkFunction : public BookmarksFunction { 110 class MoveBookmarkFunction : public BookmarksFunction {
105 virtual bool RunImpl(); 111 virtual bool RunImpl();
106 }; 112 };
107 113
108 class SetBookmarkTitleFunction : public BookmarksFunction { 114 class SetBookmarkTitleFunction : public BookmarksFunction {
109 virtual bool RunImpl(); 115 virtual bool RunImpl();
110 }; 116 };
111 117
112 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ 118 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_storage.cc ('k') | chrome/browser/extensions/extension_bookmarks_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698