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

Unified Diff: chrome/browser/ui/webui/devtools_ui.cc

Issue 9113079: DevTools: refactor remote debugging server to enable content_shell debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing. Created 8 years, 11 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/devtools_ui.cc
diff --git a/chrome/browser/ui/webui/devtools_ui.cc b/chrome/browser/ui/webui/devtools_ui.cc
index b07982b9ad5e985010275bf1039f6e883706f5ca..abe7b73af8320e82532c6b790b1a959fa42d93dc 100644
--- a/chrome/browser/ui/webui/devtools_ui.cc
+++ b/chrome/browser/ui/webui/devtools_ui.cc
@@ -15,9 +15,9 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_client_host.h"
+#include "content/public/browser/devtools_http_handler.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
-#include "grit/devtools_resources_map.h"
#include "ui/base/resource/resource_bundle.h"
using content::BrowserThread;
@@ -56,13 +56,9 @@ void DevToolsDataSource::StartDataRequest(const std::string& path,
int request_id) {
std::string filename = PathWithoutParams(path);
- int resource_id = -1;
- for (size_t i = 0; i < kDevtoolsResourcesSize; ++i) {
- if (filename == kDevtoolsResources[i].name) {
- resource_id = kDevtoolsResources[i].value;
- break;
- }
- }
+
+ int resource_id =
+ content::DevToolsHttpHandler::GetFrontendResourceId(filename);
DLOG_IF(WARNING, -1 == resource_id) << "Unable to find dev tool resource: "
<< filename << ". If you compiled with debug_devtools=1, try running"

Powered by Google App Engine
This is Rietveld 408576698