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

Side by Side Diff: chrome/browser/extensions/api/bookmarks/bookmarks_api.h

Issue 660513002: BookmarksFunction sending response after execution in all cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bookmarks/bookmarks_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_API_BOOKMARKS_BOOKMARKS_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Helper that checks if |node| can be modified. Returns false if |node| 155 // Helper that checks if |node| can be modified. Returns false if |node|
156 // is NULL, or a managed node, or the root node. In these cases the node 156 // is NULL, or a managed node, or the root node. In these cases the node
157 // can't be edited, can't have new child nodes appended, and its direct 157 // can't be edited, can't have new child nodes appended, and its direct
158 // children can't be moved or reordered. 158 // children can't be moved or reordered.
159 bool CanBeModified(const BookmarkNode* node); 159 bool CanBeModified(const BookmarkNode* node);
160 160
161 private: 161 private:
162 // BaseBookmarkModelObserver: 162 // BaseBookmarkModelObserver:
163 void BookmarkModelChanged() override; 163 void BookmarkModelChanged() override;
164 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; 164 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override;
165
166 void RunAndSendResponse();
165 }; 167 };
166 168
167 class BookmarksGetFunction : public BookmarksFunction { 169 class BookmarksGetFunction : public BookmarksFunction {
168 public: 170 public:
169 DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET) 171 DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET)
170 172
171 protected: 173 protected:
172 ~BookmarksGetFunction() override {} 174 ~BookmarksGetFunction() override {}
173 175
174 // BookmarksFunction: 176 // BookmarksFunction:
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 private: 352 private:
351 ~BookmarksExportFunction() override {} 353 ~BookmarksExportFunction() override {}
352 354
353 // BookmarksFunction: 355 // BookmarksFunction:
354 bool RunOnReady() override; 356 bool RunOnReady() override;
355 }; 357 };
356 358
357 } // namespace extensions 359 } // namespace extensions
358 360
359 #endif // CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ 361 #endif // CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bookmarks/bookmarks_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698