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

Unified Diff: chrome/browser/extensions/extension_web_ui.cc

Issue 2468673003: [Extensions] Remove ExtensionWebUI (Closed)
Patch Set: Charlie's Created 4 years, 1 month 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/extensions/extension_web_ui.cc
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index d472a5ea43f28d377ab024732ae9e5b33281f2a8..c1e2befb7a5a1e5e7bff4a70acf5a5e8455d14a9 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -15,7 +15,6 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
@@ -332,46 +331,6 @@ void ForEachOverrideList(
const char ExtensionWebUI::kExtensionURLOverrides[] =
"extensions.chrome_url_overrides";
-ExtensionWebUI::ExtensionWebUI(content::WebUI* web_ui, const GURL& url)
- : WebUIController(web_ui) {
- Profile* profile = Profile::FromWebUI(web_ui);
- const Extension* extension = extensions::ExtensionRegistry::Get(
- profile)->enabled_extensions().GetExtensionOrAppByURL(url);
- DCHECK(extension);
- DCHECK_EQ(extension_misc::kBookmarkManagerId, extension->id());
-
- // The base class defaults to enabling WebUI bindings, but we don't need
- // those (this is also reflected in ChromeWebUIControllerFactory::
- // UseWebUIBindingsForURL).
- int bindings = 0;
- web_ui->SetBindings(bindings);
-
- // Hack: A few things we specialize just for the bookmark manager.
- bookmark_manager_private_drag_event_router_.reset(
- new extensions::BookmarkManagerPrivateDragEventRouter(
- profile, web_ui->GetWebContents()));
-
- web_ui->SetLinkTransitionType(ui::PAGE_TRANSITION_AUTO_BOOKMARK);
-}
-
-ExtensionWebUI::~ExtensionWebUI() {}
-
-// static
-bool ExtensionWebUI::NeedsExtensionWebUI(
- content::BrowserContext* browser_context,
- const GURL& url) {
- CHECK(browser_context);
- const Extension* extension =
- extensions::ExtensionRegistry::Get(browser_context)->enabled_extensions().
- GetExtensionOrAppByURL(url);
- // Only use bindings for the Bookmark Manager extension, which needs it as a
- // hack (see ExtensionWebUI's constructor below).
- return extension && extension->id() == extension_misc::kBookmarkManagerId;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// chrome:// URL overrides
-
// static
void ExtensionWebUI::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {

Powered by Google App Engine
This is Rietveld 408576698