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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_utils.cc

Issue 535773002: Android: Remove more browser extensions code, including some that snuck back in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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 | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/bookmarks/bookmark_utils.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index 0cd149be4e5919f0441dda7b44bf47f17b88fcd0..c2216ba159d220a82bd0639a664a31c3a3297f02 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -27,11 +27,14 @@
#include "components/search/search.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/web_contents.h"
-#include "extensions/browser/extension_registry.h"
-#include "extensions/common/extension_set.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(ENABLE_EXTENSIONS)
+#include "extensions/browser/extension_registry.h"
+#include "extensions/common/extension_set.h"
+#endif
+
namespace chrome {
int num_bookmark_urls_before_prompting = 15;
@@ -154,6 +157,7 @@ void GetURLsForOpenTabs(Browser* browser,
// Indicates how the bookmark shortcut has been changed by extensions associated
// with |profile|, if at all.
BookmarkShortcutDisposition GetBookmarkShortcutDisposition(Profile* profile) {
+#if defined(ENABLE_EXTENSIONS)
extensions::CommandService* command_service =
extensions::CommandService::Get(profile);
@@ -183,6 +187,7 @@ BookmarkShortcutDisposition GetBookmarkShortcutDisposition(Profile* profile) {
if (removed)
return BOOKMARK_SHORTCUT_DISPOSITION_REMOVED;
+#endif
return BOOKMARK_SHORTCUT_DISPOSITION_UNCHANGED;
}
@@ -348,6 +353,7 @@ bool ShouldRemoveBookmarkThisPageUI(Profile* profile) {
}
bool ShouldRemoveBookmarkOpenPagesUI(Profile* profile) {
+#if defined(ENABLE_EXTENSIONS)
extensions::ExtensionRegistry* registry =
extensions::ExtensionRegistry::Get(profile);
if (!registry)
@@ -362,6 +368,7 @@ bool ShouldRemoveBookmarkOpenPagesUI(Profile* profile) {
if (extensions::CommandService::RemovesBookmarkOpenPagesShortcut(i->get()))
return true;
}
+#endif
return false;
}
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698