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

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

Issue 2875943003: Cleanup: Remove dead code in NewTabUI (Closed)
Patch Set: 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
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..62697923a50abf669ca6a2c5703eae84747072ff 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -28,7 +28,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 +180,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 +202,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 +232,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() {}
« chrome/browser/ui/webui/ntp/new_tab_ui.h ('K') | « 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