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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_utils_desktop.h

Issue 2809003002: Making bookmark folder context menu display the number of bookmarks that will be opened by Open All (Closed)
Patch Set: Fixing compilation issues Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/bookmarks/bookmark_utils_desktop.h
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils_desktop.h b/chrome/browser/ui/bookmarks/bookmark_utils_desktop.h
index 062817bd9367af76de9b86e2116c5bb296f96392..2e5e7ec123c0cd92909efe5c2d057d1373d313ca 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils_desktop.h
+++ b/chrome/browser/ui/bookmarks/bookmark_utils_desktop.h
@@ -28,7 +28,7 @@ namespace chrome {
//
// NOTE: treat this as a const. It is not const so unit tests can change the
// value.
-extern int num_bookmark_urls_before_prompting;
+extern size_t kNumBookmarkUrlsBeforePrompting;
// Opens all the bookmarks in |nodes| that are of type url and all the child
// bookmarks that are of type url for folders in |nodes|. |initial_disposition|
@@ -47,6 +47,18 @@ void OpenAll(gfx::NativeWindow parent,
WindowOpenDisposition initial_disposition,
content::BrowserContext* browser_context);
+// Returns the count of bookmarks that would be opened by OpenAll. If
+// |incognito_context| is set, the function will use it to check if the URLs can
+// be opened in incognito mode, which may affect the count.
+int OpenCount(gfx::NativeWindow parent,
+ const std::vector<const bookmarks::BookmarkNode*>& nodes,
+ content::BrowserContext* incognito_context = nullptr);
+
+// Convenience for OpenCount() with a single BookmarkNode.
+int OpenCount(gfx::NativeWindow parent,
+ const bookmarks::BookmarkNode* node,
+ content::BrowserContext* incognito_context = nullptr);
+
// Asks the user before deleting a non-empty bookmark folder.
bool ConfirmDeleteBookmarkNode(const bookmarks::BookmarkNode* node,
gfx::NativeWindow window);
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc ('k') | chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698