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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 2875943003: Cleanup: Remove dead code in NewTabUI (Closed)
Patch Set: review 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 | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index aa82c60580ebe23c6646a96c15681f8bbd4c8916..f0466b39ea0476e79e6ffb5dec0fa6c611058ed7 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include <memory>
+#include <string>
#include "base/i18n/rtl.h"
#include "base/memory/ptr_util.h"
@@ -28,7 +29,6 @@
#include "content/public/browser/web_ui.h"
#include "extensions/browser/extension_system.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/resource/resource_bundle.h"
#include "url/gurl.h"
using content::BrowserThread;
@@ -181,18 +181,6 @@ void NewTabUI::NewTabHTMLSource::StartDataRequest(
const content::URLDataSource::GotDataCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- std::map<std::string, std::pair<std::string, int> >::iterator it =
- resource_map_.find(path);
- if (it != resource_map_.end()) {
- scoped_refptr<base::RefCountedMemory> resource_bytes(
- it->second.second ?
- ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
- it->second.second) :
- new base::RefCountedStaticMemory);
- callback.Run(resource_bytes.get());
- return;
- }
-
if (!path.empty() && path[0] != '#') {
// A path under new-tab was requested; it's likely a bad relative
// URL from the new tab page, but in any case it's an error.
@@ -215,10 +203,6 @@ void NewTabUI::NewTabHTMLSource::StartDataRequest(
std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string& resource)
const {
- std::map<std::string, std::pair<std::string, int> >::const_iterator it =
- resource_map_.find(resource);
- if (it != resource_map_.end())
- return it->second.first;
return "text/html";
}
@@ -249,13 +233,4 @@ std::string NewTabUI::NewTabHTMLSource::GetContentSecurityPolicyChildSrc()
return "child-src chrome-search://most-visited;";
}
-void NewTabUI::NewTabHTMLSource::AddResource(const char* resource,
- const char* mime_type,
- int resource_id) {
- DCHECK(resource);
- DCHECK(mime_type);
- resource_map_[std::string(resource)] =
- std::make_pair(std::string(mime_type), resource_id);
-}
-
NewTabUI::NewTabHTMLSource::~NewTabHTMLSource() {}
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698