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

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

Issue 985073003: [DevTools] Pass remoteBase query param to frontend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/browser/ui/webui/devtools_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1a02d870cd723dc588e28e410e4e2df573b876d0..fe8a6712423fa572b2c20cdc9e9cea30d9d954da 100644
--- a/chrome/browser/ui/webui/devtools_ui.cc
+++ b/chrome/browser/ui/webui/devtools_ui.cc
@@ -24,6 +24,7 @@
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
+#include "content/public/common/user_agent.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_context_getter.h"
@@ -42,6 +43,7 @@ std::string PathWithoutParams(const std::string& path) {
const char kRemoteFrontendDomain[] = "chrome-devtools-frontend.appspot.com";
const char kRemoteFrontendBase[] =
"https://chrome-devtools-frontend.appspot.com/";
+const char kRemoteFrontendPath[] = "serve_file";
const char kHttpNotFound[] = "HTTP/1.1 404 Not Found\n\n";
#if defined(DEBUG_DEVTOOLS)
@@ -353,6 +355,15 @@ GURL DevToolsUI::GetProxyURL(const std::string& frontend_url) {
url.path().substr(1).c_str()));
}
+// static
+GURL DevToolsUI::GetRemoteBaseURL() {
+ return GURL(base::StringPrintf(
+ "%s%s/%s/",
+ kRemoteFrontendBase,
+ kRemoteFrontendPath,
+ content::GetWebKitRevision().c_str()));
+}
+
DevToolsUI::DevToolsUI(content::WebUI* web_ui)
: WebUIController(web_ui),
content::WebContentsObserver(web_ui->GetWebContents()),
« no previous file with comments | « chrome/browser/ui/webui/devtools_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698