From 804d56e1392dcb9cbd2d2351e50833f6098b6ab4 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 23 Jan 2017 14:55:06 +0900 Subject: [PATCH] Signature of StartDataRequest has changed --- brightray/browser/devtools_ui.cc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/brightray/browser/devtools_ui.cc b/brightray/browser/devtools_ui.cc index 24d7d4737ca..9764886d571 100644 --- a/brightray/browser/devtools_ui.cc +++ b/brightray/browser/devtools_ui.cc @@ -14,7 +14,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" - namespace brightray { namespace { @@ -62,19 +61,21 @@ class BundledDataSource : public content::URLDataSource { return kChromeUIDevToolsHost; } - void StartDataRequest(const std::string& path, - int render_process_id, - int render_frame_id, - const GotDataCallback& callback) override { + void StartDataRequest( + const std::string& path, + const content::ResourceRequestInfo::WebContentsGetter& wc_getter, + const GotDataCallback& callback) override { // Serve request from local bundle. std::string bundled_path_prefix(kChromeUIDevToolsBundledPath); bundled_path_prefix += "/"; if (base::StartsWith(path, bundled_path_prefix, base::CompareCase::INSENSITIVE_ASCII)) { StartBundledDataRequest(path.substr(bundled_path_prefix.length()), - render_process_id, render_frame_id, callback); + callback); return; } + + // We do not handle remote and custom requests. callback.Run(nullptr); } @@ -94,11 +95,8 @@ class BundledDataSource : public content::URLDataSource { return true; } - void StartBundledDataRequest( - const std::string& path, - int render_process_id, - int render_frame_id, - const content::URLDataSource::GotDataCallback& callback) { + void StartBundledDataRequest(const std::string& path, + const GotDataCallback& callback) { std::string filename = PathWithoutParams(path); base::StringPiece resource = content::DevToolsFrontendHost::GetFrontendResource(filename);