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

Unified Diff: chrome/browser/bookmarks/bookmark_model_factory.cc

Issue 2901463002: [MD Bookmarks] Add undo/redo functionality to MD Bookmarks. (Closed)
Patch Set: fix test Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/resources/md_bookmarks/command_manager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_model_factory.cc
diff --git a/chrome/browser/bookmarks/bookmark_model_factory.cc b/chrome/browser/bookmarks/bookmark_model_factory.cc
index 46069a63f171a5c6647cf839d8682b6dfe99ae56..dff7105519351aa336838b6fbcf099a0ad1188e4 100644
--- a/chrome/browser/bookmarks/bookmark_model_factory.cc
+++ b/chrome/browser/bookmarks/bookmark_model_factory.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/bookmarks/startup_task_runner_service_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.h"
#include "chrome/browser/undo/bookmark_undo_service_factory.h"
#include "chrome/common/chrome_switches.h"
#include "components/bookmarks/browser/bookmark_model.h"
@@ -73,7 +74,8 @@ KeyedService* BookmarkModelFactory::BuildServiceInstanceFor(
#if !defined(OS_ANDROID)
register_bookmark_undo_service_as_observer =
base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBookmarkUndo);
+ switches::kEnableBookmarkUndo) ||
+ MdBookmarksUI::IsEnabled();
sky 2017/05/24 16:57:16 Where do we make use of the undo in non-android? F
calamity 2017/05/25 08:54:02 It's behind a flag for the bookmarks bar context m
sky 2017/05/25 18:09:06 If you don't enable undo in the menu how is it pos
#endif // !defined(OS_ANDROID)
if (register_bookmark_undo_service_as_observer)
BookmarkUndoServiceFactory::GetForProfile(profile)->Start(bookmark_model);
« no previous file with comments | « no previous file | chrome/browser/resources/md_bookmarks/command_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698