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

Unified Diff: chrome/browser/devtools/devtools_adb_bridge.cc

Issue 65143004: DevTools: Refactor InspectUI class for extensibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments, rebased Created 7 years, 1 month 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 | « no previous file | chrome/browser/devtools/devtools_targets_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_adb_bridge.cc
diff --git a/chrome/browser/devtools/devtools_adb_bridge.cc b/chrome/browser/devtools/devtools_adb_bridge.cc
index 2f8456940b8c9a6c0c3470d9ebfc142391abc542..760f66a3761cb82d6ac3713cdcf0133db3b03a18 100644
--- a/chrome/browser/devtools/devtools_adb_bridge.cc
+++ b/chrome/browser/devtools/devtools_adb_bridge.cc
@@ -1044,7 +1044,15 @@ void DevToolsAdbBridge::RemoteBrowser::SendProtocolCommand(
static void NoOp(int, const std::string&) {}
-void DevToolsAdbBridge::RemoteBrowser::Open(const std::string& url) {
+void DevToolsAdbBridge::RemoteBrowser::Open(const std::string& input_url) {
+ GURL gurl(input_url);
+ if (!gurl.is_valid()) {
+ gurl = GURL("http://" + input_url);
+ if (!gurl.is_valid())
+ return;
+ }
+ std::string url = gurl.spec();
+
ParsedVersion parsed_version = GetParsedVersion();
if (IsChrome() &&
!parsed_version.empty() &&
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_targets_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698