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..8dc6f83648a0a1ad42909f14b6a6d8fac04703b7 100644 |
--- a/chrome/browser/ui/webui/devtools_ui.cc |
+++ b/chrome/browser/ui/webui/devtools_ui.cc |
@@ -13,6 +13,7 @@ |
#include "chrome/browser/net/chrome_url_request_context.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/url_constants.h" |
+#include "components/devtools_remote_frontend/devtools_remote_frontend_util.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/devtools_http_handler.h" |
#include "content/public/browser/url_data_source.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,9 @@ 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( |
+ devtools_remote_frontend::GetDevToolsFrontendResourceURL(path)); |
+ CHECK(devtools_remote_frontend::IsDevToolsFrontendHost(url)); |
new FetchRequest(request_context_.get(), url, callback); |
} |
@@ -228,7 +227,7 @@ GURL DevToolsUI::GetProxyURL(const std::string& frontend_url) { |
} |
#endif // defined(DEBUG_DEVTOOLS) |
CHECK(url.is_valid()); |
- CHECK_EQ(url.host(), kRemoteFrontendDomain); |
+ CHECK(devtools_remote_frontend::IsDevToolsFrontendHost(url)); |
return GURL(base::StringPrintf("%s://%s/%s/%s", |
chrome::kChromeDevToolsScheme, |
chrome::kChromeUIDevToolsHost, |