Index: components/devtools_http_handler/devtools_http_handler.cc |
diff --git a/components/devtools_http_handler/devtools_http_handler.cc b/components/devtools_http_handler/devtools_http_handler.cc |
index 48f58113f39bb67483a0b184aa629a91c565e184..38f32dc1da2ebbc96522612e23e131b1edc069dd 100644 |
--- a/components/devtools_http_handler/devtools_http_handler.cc |
+++ b/components/devtools_http_handler/devtools_http_handler.cc |
@@ -395,7 +395,7 @@ |
const net::HttpServerRequestInfo& info) { |
server_->SetSendBufferSize(connection_id, kSendBufferSizeForDevTools); |
- if (base::StartsWith(info.path, "/json", base::CompareCase::SENSITIVE)) { |
+ if (info.path.find("/json") == 0) { |
BrowserThread::PostTask( |
BrowserThread::UI, |
FROM_HERE, |
@@ -406,8 +406,7 @@ |
return; |
} |
- if (base::StartsWith(info.path, kThumbUrlPrefix, |
- base::CompareCase::SENSITIVE)) { |
+ if (info.path.find(kThumbUrlPrefix) == 0) { |
// Thumbnail request. |
const std::string target_id = info.path.substr(strlen(kThumbUrlPrefix)); |
BrowserThread::PostTask( |
@@ -431,8 +430,7 @@ |
return; |
} |
- if (!base::StartsWith(info.path, "/devtools/", |
- base::CompareCase::SENSITIVE)) { |
+ if (info.path.find("/devtools/") != 0) { |
server_->Send404(connection_id); |
return; |
} |
@@ -519,7 +517,7 @@ |
return true; |
} |
- if (!base::StartsWith(path, "/", base::CompareCase::SENSITIVE)) { |
+ if (path.find("/") != 0) { |
// Malformed command. |
return false; |
} |
@@ -698,8 +696,8 @@ |
return; |
std::string browser_prefix = "/devtools/browser"; |
- if (base::StartsWith(request.path, browser_prefix, |
- base::CompareCase::SENSITIVE)) { |
+ size_t browser_pos = request.path.find(browser_prefix); |
+ if (browser_pos == 0) { |
scoped_refptr<DevToolsAgentHost> browser_agent = |
DevToolsAgentHost::CreateForBrowser( |
thread_->task_runner(), |
@@ -723,8 +721,8 @@ |
return; |
} |
- if (!base::StartsWith(request.path, kPageUrlPrefix, |
- base::CompareCase::SENSITIVE)) { |
+ size_t pos = request.path.find(kPageUrlPrefix); |
+ if (pos != 0) { |
Send404(connection_id); |
return; |
} |