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 34dbfb0dbb5f07276743c454d9fd989777f2ab84..dafaba43c2c7e21eded69927bac2a91645ee306e 100644 |
--- a/chrome/browser/ui/webui/devtools_ui.cc |
+++ b/chrome/browser/ui/webui/devtools_ui.cc |
@@ -15,6 +15,7 @@ |
#include "chrome/common/url_constants.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/devtools_http_handler.h" |
+#include "content/public/browser/devtools_remote_frontend_util.h" |
#include "content/public/browser/url_data_source.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_ui.h" |
@@ -33,9 +34,6 @@ std::string PathWithoutParams(const std::string& path) { |
.path().substr(1); |
} |
-const char kRemoteFrontendDomain[] = "chrome-devtools-frontend.appspot.com"; |
-const char kRemoteFrontendBase[] = |
- "https://chrome-devtools-frontend.appspot.com/"; |
const char kHttpNotFound[] = "HTTP/1.1 404 Not Found\n\n"; |
#if defined(DEBUG_DEVTOOLS) |
@@ -179,8 +177,8 @@ class DevToolsDataSource : public content::URLDataSource { |
int render_process_id, |
int render_view_id, |
const content::URLDataSource::GotDataCallback& callback) { |
- GURL url = GURL(kRemoteFrontendBase + path); |
- CHECK_EQ(url.host(), kRemoteFrontendDomain); |
+ GURL url = GURL(content::GetDevToolsFrontendResourceURL(path)); |
+ CHECK(content::IsDevToolsFrontendHost(url)); |
new FetchRequest(request_context_.get(), url, callback); |
} |
@@ -228,7 +226,7 @@ GURL DevToolsUI::GetProxyURL(const std::string& frontend_url) { |
} |
#endif // defined(DEBUG_DEVTOOLS) |
CHECK(url.is_valid()); |
- CHECK_EQ(url.host(), kRemoteFrontendDomain); |
+ CHECK(content::IsDevToolsFrontendHost(url)); |
return GURL(base::StringPrintf("%s://%s/%s/%s", |
chrome::kChromeDevToolsScheme, |
chrome::kChromeUIDevToolsHost, |